I have this html syntax:

我有这个HTML语法:

<input type="checkbox" id="openInNewWindowCheckBox" value ="some_value"  />

and a jquery script:

和一个jquery脚本:

$("#openInNewWindowCheckBox").change(function(){

            if($(this).is(':checked'))
            { 

            }
            else
            { 

            }   

            return false; 
        });

and in IE i just can't change or unchange the checkbox, html for it looks like this:

在IE中我只是无法更改或取消更改复选框,html因为它看起来像这样:

<input id="openInNewWindowCheckBox" type="checkbox" _just_changed="true" jQuery18203967820199374023="133" value="some_value"/>

2 个解决方案

#1


2

Returning false prevents the default action. You try returning true for that.

返回false会阻止默认操作。你尝试为此返回true。

         $("#openInNewWindowCheckBox").change(function(){

        if($(this).is(':checked'))
        { 
            console.log('a');
        }
        else
        { 
            console.log('b');
        }   

        return true; 
    });

更多相关文章

  1. 如何从Python脚本向jQuery发送JSON对象?
  2. Ajax调用php脚本返回404错误
  3. 使用jquery的$ .ajax来获取node.js脚本的输出,而不是它的代码
  4. Chrome显示错误为:由于内容安全策略,拒绝执行内联脚本
  5. jquery之data()、stop()、delay()的语法和使用
  6. 提交表单时需要运行php脚本
  7. 用无序列表键入文本脚本
  8. Python脚本利用openoffice将office文档转为html或者pdf。
  9. 韩顺平_轻松搞定网页设计(html+css+javascript)_第19讲_js运行原

随机推荐

  1. Android 获取网络图片
  2. Android SharedPreferences本地缓存
  3. 如何开始使用Android应用程序模板
  4. iphone、android的mimetype
  5. Android 富文本编辑器 - ListItemSpan
  6. 【Android】AsyncTask 实现登陆
  7. Android编译相关
  8. Android working with Volley Library
  9. 通过设置android:imeOptions来改变软键盘
  10. Android 5.0.1 Layout_toLeftOf不生效