局部刷新页面,改变验证码

<script language="javascript">
     function getimgcode()
         {
              var randomnum = Math.random();
              var getimagecode = document.getElementById("getcode");
              getimagecode.src = "CheckCode.aspx?" + randomnum;
         }
</script>

 

<IMG id="getcode" alt="" src="CheckCode.aspx"><A href="javascript:getimgcode()">刷新验证码</A> 

 

 

--------参考CSDN帖子

你可能感兴趣的:(JavaScript,function)