![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
jquery
青崖林夕
脚踏实地,仰望星空!
展开
-
jQuery绑定动态生成的元素,事件绑定失效
Old Code:$('code').click(function () { console.log($(this).text());});New Code:(.container 是<code>所在的div)$('.container').on("click", "code", function () { console.log($(this).text());});原创 2021-02-09 11:23:56 · 107 阅读 · 0 评论 -
jquery获取当前日期时间
$(function() { var myDate = new Date; var year = myDate.getFullYear(); //获取当前年 var mon = myDate.getMonth() + 1; //获取当前月 var date = myDate.getDate(); //获取当前日 // var h = myDate.getH...原创 2019-11-14 10:10:46 · 2293 阅读 · 0 评论