日期:2014-05-18 浏览次数:20522 次
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script> <script language="javascript" type="text/javascript"> $(document).ready(function () { $("#HiddenField1").val("aaa"); alert($("#HiddenField1").val()); }); function ReduceSerching() { htmlobj = $.ajax({ url: "WebForm1.aspx", async: false }); alert(htmlobj.responseText); } </script> </head> <body> <form id="form1" runat="server"> <div> <input id="Hidden1" type="hidden" runat="server" /> <asp:HiddenField ID="HiddenField1" runat="server" /> <input id="Button1" type="button" value="button" onclick="javascript:ReduceSerching()" /> </div> </form> </body> </html>
protected void Page_Load(object sender, EventArgs e) { Response.Write(HiddenField1.Value);[color=#FF0000]为什么这就取不到值呢,死活都取不到,跪求解答555555[/color] }