前台:

<asp:Image ID="Image1" runat="server" ImageUrl="CheckCode.aspx" />

后台:

this.TextBox3.Text!=Session["code"].ToString()

 

点击刷新:

<script language="JavaScript">
function reloadcode(){
var verify=document.getElementById('safecode');
verify.setAttribute('src',‘CheckCode.aspx'+Math.random());
}
</script>

 

<img src="images/chknumber.asp"    id="safecode" border="0" onclick="reloadcode()"  style="cursor:hand;padding:2px 8px 0pt 3px;"  />

CheckCode.zip

posted on 2012-02-14 22:10  gzh4455  阅读(153)  评论(0编辑  收藏  举报