<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<html>
<form action="index.jsp">
<body>
First INPUT:
<input name="firstinput" type="text" value=<%=request.getParameter( "firstinput") %>>
<br>
<input type="submit" value="Submit">
<% String first = request.getParameter("firstinput");
out.println(first); %>
</body>
</form>
</html>
这是我的代码,当放置输入税,然后在按钮单击其设置为税并打印税时,但是当我纳税输入“税”时,将值设置为输入框中的税,同时打印正确的“税”,我也想设置输入框值“税”当我点击后输入“税”请帮忙
你两者都有:
name="firstinput"
and
name="fname"
对于相同的输入字段!
UPDATE:除此之外,更改:
value=<%=request.getParameter("firstinput") %>>
to:
value='<%=request.getParameter("firstinput")%>' />
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)