字符串拼接中,参数引号""的转义处理

value=\""+a.id\"

 

选择器中的空格转义;  没有找到特别好的方法 所有 使用了 '   '

function selectChecked(rootcheck, checkbox) {

    $('.' + rootcheck).is(':checked') ? $("." + checkbox + ' ' + "input[type='checkbox']").attr('checked', true) : $("." + checkbox + ' ' + "[type='checkbox']").attr('checked', false)
}

 

posted @ 2017-09-07 18:41  monkye  阅读(752)  评论(0编辑  收藏  举报