<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'DwrTest.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!-- 注意三个JS文件的引入顺序,不然会报错 -->
<script type="text/javascript" src="dwr/util.js"></script>
<script type="text/javascript" src="dwr/engine.js"></script>
<script type="text/javascript" src="dwr/interface/T6.js"></script>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript">
function test1(){
T6.hasPermission(
$("name").value,
$("permission").value,
function(data){
alert(data);
}
);
}
</script>
</head>
<body>
姓名:<input type="text" name="name"><br>
权限:<input type="text" name="permission"><br>
<input type="button" value="提交" onclick="test1()">
</body>
</html>
上面代码在IE浏览器上跑得通到firefox 就不行了
提示的错误是$("name") is null
[Break on this error] $("name").value,
有遇上这一错误朋友,麻烦说下,在线急等
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'DwrTest.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!-- 注意三个JS文件的引入顺序,不然会报错 -->
<script type="text/javascript" src="dwr/util.js"></script>
<script type="text/javascript" src="dwr/engine.js"></script>
<script type="text/javascript" src="dwr/interface/T6.js"></script>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript">
function test1(){
T6.hasPermission(
$("name").value,
$("permission").value,
function(data){
alert(data);
}
);
}
</script>
</head>
<body>
姓名:<input type="text" name="name"><br>
权限:<input type="text" name="permission"><br>
<input type="button" value="提交" onclick="test1()">
</body>
</html>
上面代码在IE浏览器上跑得通到firefox 就不行了
提示的错误是$("name") is null
[Break on this error] $("name").value,
有遇上这一错误朋友,麻烦说下,在线急等
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货