JS&JQuery 常用函数

字符串转换为数字

parseInt(string) 、parseFloat()、Number()

参考博客:https://zhidao.baidu.com/question/629898532158572524.html

 

$(element).empty() 清空内容

$(element).remove() 删除元素

合并属性进行查询 $(“[data-toggle=tab][class*=active]”).length