//选中、不选中
$("input:checkbox").prop("checked", true/false);
//列出所有选中的
$("input:checkbox:checked").each(function () {...});
//判断是否选中
if ($(this).is(':checked')) {...}
一路疯驰(沪ICP备15037456号-1)
//选中、不选中
$("input:checkbox").prop("checked", true/false);
//列出所有选中的
$("input:checkbox:checked").each(function () {...});
//判断是否选中
if ($(this).is(':checked')) {...}
var importJs=document.createElement('script');
importJs.setAttribute("type","text/javascript");
importJs.setAttribute("src", 'http://ajax.microsoft.com/ajax/jquery/jquery-1.4.min.js');
<meta http-equiv="X-UA-Compatible" content="IE=11;IE=10;IE=9;IE=8;IE=7;" />
不带参数的方式在firefox中使用有问题
$(window).keydown(function (e) {
var curKey = e.which;
if (e.ctrlKey && curKey == 81) {
try{
top.location.hostname;
if (top.location.hostname != window.location.hostname) {
top.location.href =window.location.href;
}
}
catch(e){
top.location.href = window.location.href;
}