IE9 Selectbox onchange Event doesnt fire correct
I have a normal Selectbox
<select id="areaSelectBox" onchange="javascript:checklistObj.CreateAreaFields(this)">
checklistO开发者_运维问答bj
is a object oriented prototype class with the function CreateAreaFields
.
Debug: Script block [dynmaic] Runtime Error in JScript. This Object doesn't support this Method... (Break, Continue, Ignore)...
Please help.
onchange works fine for me in ie9. something is wrong with your function.
<select onchange="javascript:alert('test')">
<option>1</option>
<option>2</option>
</select>
I found that this did not work in IE9 if the option in
"Tools" --> "Compatibility View Settings" --> "Display all websites in Compatibility View"
or
"Display intranet sites in Compatibility View"
was selected. Once I removed these it worked fine. I discovered this by using the "Developer Tools" that come with IE9. Press F12 to open Developer Tools and watch the "Console" tab for errors.
精彩评论