验证码刷新
<html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <script language="javascript" type="text/javascript"> function reloadcode() { document.getElementById("safecode").src = document.getElementById("safecode").src + '?'; } </script> </head> <body> <form id="form1" runat="server" style="background-color: #C9E7F7; height: 700px"> <div> <table style="height: 100%; margin-left: 0px; 100%; background-image: url('../Image/2029588_111311065661_2.jpg'); margin-top: 0px"> <tr> <td style=" 50px; height: 25px;"> 账 号: </td> <td style=" 100px"> <asp:TextBox ID="TextBox2" runat="server" Width="150px"></asp:TextBox> </td> </tr> <tr> <td style="height: 25px"> 密 码: </td> <td> <asp:TextBox ID="TextBox4" runat="server" Width="150px" TextMode="Password"></asp:TextBox> </td> </tr> <tr> <td style="height: 25px"> 验证码: </td> <td> <asp:TextBox ID="TextBox1" runat="server" Width="150px" /> </td> <td> <img id="safecode" src="../Code/code.aspx" onclick="this.src=this.src+'?'" /> <a href="javascript:reloadcode();" title="更换一张验证码图片">看不清,请换一张</a> </td> <td style="text-align: left"> <asp:Label ID="Label3" runat="server" ForeColor="#FF3300"></asp:Label> </td> </tr> <tr> <td> <asp:Button ID="Button8" runat="server" OnClick="Button8_Click" Text="登 录" Width="80px" /> </td> </tr> </table> </div> </form> </body> </html>