分享一则javascript 调试技巧
(编辑:jimmy 日期: 2025/5/11 浏览:3 次 )
不用alert,用console.log()
复制代码 代码如下:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function showLog(message){
console.log(message);
}
function test(name){
showLog(name);
}
test("hello");
</script>
</head>
<body>
</body>
</html>
以上算是一个个人心得,这里分享给大家,小伙伴们试试看。
下一篇:javascript实现无限级select联动菜单