目录

调试技巧

console 引入 jquery

var importJs=document.createElement('script');importJs.setAttribute("type","text/javascript");importJs.setAttribute("src", 'https://ajax.microsoft.com/ajax/jquery/jquery-1.7.min.js');document.getElementsByTagName("head")[0].appendChild(importJs);

提取数组中的href

$('section a').each(function(index){
	console.log($(this).attr("href"));
})

当前页面date

var d = new Date();d.setHours(5);console.log(d);