button客户端到服务端的转化
大家试着执行下面的代码:
<INPUT type="button" value="Button" id="Button2" name="Button2" runat="server" OnClick="document.WebForm2.Button2.value='rrrrrrrrrrrrr';" >
为什么Button2.value=rrrrrr,只是一闪而过?但最后value还是Button?
察看源文件多了 __doPostBack 这些东西
<input language="javascript" onclick="document.WebForm2.Button2.value='rrrrrrrrrrrrr'; __doPostBack('Button2','')" name="Button2" id="Button2" type="button" value="Button" />
---------
我想知道如何才能onclick后,button的value=rrrr