<html>
<head></head>
<body>
<img id="verifyCode" onclick="reloadCode()" src="VerifyCodeServlet" />
</body>
<script type="text/javascript">
function reloadCode(){
var verifyCodeNode = document.getElementById('verifyCode');
// 这里必须加入随机数,不然会被浏览器判定为同个请求,无法重新加载
verCodeNode.setAttribute('src', 'VerifyCodeServlet?' + Math.random());
}
</script>
</html>