开发者

IE9 Selectbox onchange Event doesnt fire correct

开发者 https://www.devze.com 2023-02-26 19:31 出处:网络
I have a normal Selectbox <select id=\"areaSelectBox\" onchange=\"javascript:checklistObj.CreateAreaFields(this)\">

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消