Js:
<script type="text/javascript">
function reloadcode(){
var verify=document.getElementById('safecode');
verify.setAttribute('src','image.jsp?'+Math.random());
//这里必须加入随机数不然地址相同我发重新加载
}
</script>
HTML:
<img id="safecode" border="0" onclick="reloadcode()" src="image.jsp">