<img src="code.png" onclick="this.src ={$maccms.path_tpl}picture/captcha.png"
<script language="JavaScript">function reloadcode(){
var verify=document.getElementById('safecode')
verify.setAttribute('src','images/chknumber.jsp?'+Math.random())
//这里必须加入随机数不然地址相同我发重新加载
}
</script>
=========================
然后再验证码图片里面写onclick呼出上面的函数重新加载.
程序代码
<img src="images/chknumber.jsp"id="safecode" border="0" onclick="reloadcode()" style="cursor:handpadding:2px 8px 0pt 3px" />