我需要你的帮助我知道这是一个愚蠢的问题但我无法解决它......对不起:(
我有一个javascript文件welcome.js,我有
function alert()
{
return 10;
}
我有另一个 html 文件welcome.html 在其中调用welcome.js 文件
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script type="text/javascript src="welcome.js"></script>
<script>
function myFunction()
{
var x = alert();
return x;
}
</script>
</head>
<body>
<input type="button" onclick="myFunction();" value="Show alert box">
我不断在 Mozilla 控制台中收到此错误
时间戳:5/28/2013 9:56:47 PM 错误:NS_ERROR_XPC_NOT_ENOUGH_ARGS:没有足够的参数 [nsIDOMWindow.alert]