<img src onclick="this.src='
http://localhost:8081/captcha.jpg?uuid='+getUUID();" title="看不清?点击换一张" id="yanZhengMa">
function getUUID() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0,
v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
我用这个实现了每次点击后,验证码都会变,而且后台存储了这个验证码和对应的uuid。可是再点“注册”的时候,uuid如何传给后台呢?谢谢
--
FROM 120.242.253.*