请教程序某一处的意思...
<head><script type="text/javascript">
var txt=""
function message()
{
try
{
adddlert("Welcome guest!")
}
catch(err)
{
txt="There was an error on this page.nn"
txt+="Error description: " + err.description + "nn"
txt+="Click OK to continue.nn"
alert(txt)
}
}
</script>
</head>
<body>
<input type="button" value="View message" onclick="message()" />
</body>
[color=RoyalBlue]catch(err)
{
txt="There was an error on this page.nn"
txt+="Error description: " + err.description + "nn"
txt+="Click OK to continue.nn"
alert(txt)
这里面为什么这么多nn呢,是什么意思啊?page.nn和continue.nn又分别是什么意思呢?[/color] 有没有写错?没错的话就是一个字符串,没什么特殊的!
但我猜测可能是写错了,应该为\n 换行符号 我觉得也是换行的,如果不是那真的没什么意思了。[em09] 呃...我开始也觉得是换行,不过page.n和continue.n实现不了换行捏...page和continue也不知道什么意思... 不是换行就是字符串,还有什么意思啊....[bc02]
页:
[1]
