<%@ page contentType="text/htmlcharset=GB2312" %>
<%
String num=request.getParameter("test")
String result=""
if(num!=null)
result=""+(Integer.parseInt(num)*Integer.parseInt(num))
%>
<HTML>
<head>
<title>
模拟题1
</title>
</head>
<BODY bgcolor="#eeeeee"><center><Font size=4>
<h1>求N的平方根</h1>
<center>
<FORM action="1.jsp" Method="post" >
<P>输入N的值:
<Input type=text name="test">
<Input type=submit name="submit1" value="确定">
N的平方根=<%=result%>
</FORM>
<hr>
</Font>
</center>
</Body>
</HTML>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)