-1
我收到以下错误这个程序有什么错误?它显示遗漏的类型错误
uncaught typeerror : object is not a function
在下面的代码。
<html>
<head>
<title>Reverse</title>
</head>
<body>
<form name="rev1">
Enter the string : <input type="text" name="str">
<input type="button" value="click" onclick="rev1()" />
而这正是我找到了错误的地方:
reverse of given string : <input type="text" name="res">
</form>
<script type="text/JavaScript">
function rev1(){
//var a=rev1.str.value;
//document.write("hello");
alert("hello");
}
</script>
</body>
</html>
什么可能导致此,如何解决呢?
错误是不是很明显?你试图使用一个变量'数字'作为一个函数,而它不是一个函数。按Ctrl + F'数字()'应该把你带到正确的地方。 – 2012-07-29 10:49:36
对于这两位封闭选民来说,这是不是“不建设性”? – Bart 2012-07-29 10:49:47
我得到错误,因为对象不是函数.. – user1560820 2012-07-29 10:52:16