a页面:
<form action="b.htm" method="post">
<input name="txt" type="text" id="label1" size="40">
<input name="Submit" type="submit" id="Submit" value="Submit">
</form>b页面
<%String txt= request.QueryString("txt");%>
<input type="button" id="okbutton" value="<%=txt%>">为什么b页面的按钮显示的是"<%=txt%>" 而不能得到a页面中text的值?
<form action="b.htm" method="post">
<input name="txt" type="text" id="label1" size="40">
<input name="Submit" type="submit" id="Submit" value="Submit">
</form>b页面
<%String txt= request.QueryString("txt");%>
<input type="button" id="okbutton" value="<%=txt%>">为什么b页面的按钮显示的是"<%=txt%>" 而不能得到a页面中text的值?
<input type="button" id="okbutton" value="<%=txt%>">我这样写的,还是不行,是不是格式错了?
<input id="Button1" type="button" value="button" runat="server" />然后写后台代码:
Button1.Value=Request.Form("txt");你可以多次改变 Button1.Value 的值,在不同的事件中。
void Page_Load(Object sender, EventArgs e)
{
Button1.Value=Request.Form("txt");
}
</script>我的后台代码这样写,不能得到参数,是哪里不对呢?