我是 javascript 的新手。我正在尝试从我的 jsp 中调用 javaScript 函数。它不起作用。我试图通过 bugzila 调试它。它说“此页面上没有 Javascript”
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4 /loose.dtd">
<html>
<script type="text/javascript" src="ajaxs.js"></script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<%
out.println("Bismillahir Rahmanir Rahim");
%>
<jsp:useBean id="numBean" class="beans.NumberBean">
<jsp:setProperty name="numBean" property="*" />
</jsp:useBean>
<form action="index.jsp" method="post">
<table>
<tr>
<td>Enter Integers:</td>
<td><input type="text" id="inputString" name="inputString"
value="<jsp:getProperty name="numBean" property="inputString" />"
/> </td>
<td>(Use semi-colon to separate number)</td>
</tr>
<tr>
<td>M - number of largest element to find.:</td>
<td>
<input type="text" id="nthHighest" name="nthHighest"
value="<jsp:getProperty name="numBean" property="nthHighest" />" />
</td>
</tr>
</table>
<input type="submit" value="Identify" onclick="ajaxFunction()" />
<div id="result"></div>
</form>
</body>
</html>
我试图在 onclick 事件上调用“ajaxFunction()”。我在顶部包含了如下的js文件:
<script type="text/javascript" src="ajaxs.js"></script>
你能帮我确定我在这里做错了什么......
提前致谢