首页 > 语言 > JavaScript > 正文

分享一则javascript 调试技巧

2024-05-06 16:13:32
字体:
来源:转载
供稿:网友
这篇文章主要分享了一则javascript 调试技巧,需要的朋友可以参考下
 
 

不用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>

 

以上算是一个个人心得,这里分享给大家,小伙伴们试试看。


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选