摘要: 例如: 要提取 "sheme_142857"中的数字,142857的方法为 var result = "sheme_142857".match( /_(\d+)/ ); alert(result[1]); //result[1]代表上面小括号中的内容; 总结:match方法会获取整个正则表达式的内容 阅读全文
posted @ 2022-11-13 09:53 LOOKALOOK 阅读(159) 评论(0) 推荐(0)
摘要: 1 事件回调函数中的this代表事件绑定的DOM元素,因此,可以用 $(this)获得该DOM元素的引用; 例如:$("#myID").click(function(){ $(this).hide(); });//这里的this代指"#myID" 例如:$("#myID").on("click"," 阅读全文
posted @ 2022-11-06 14:36 LOOKALOOK 阅读(33) 评论(0) 推荐(0)