原来点击验证码是可以刷新的,后来加载了一些js可能冲突了,有什么办法解决吗?
function fleshVerify(type){
//重载验证码
var timenow = new Date().getTime();
if (type)
{
$('verifyImg').src= '__URL__/verify/adv/1/'+timenow;
}else{
$('verifyImg').src= '__URL__/verify/'+timenow;
}
}
if ( window != top){ window.top.location =window.location;}
</SCRIPT>
<IMG id="verifyImg" SRC="__URL__/verify/" onClick="fleshVerify()" BORDER="0" ALT="点击刷新验证码" style="cursor:pointer" align="absmiddle"></td>
function fleshVerify(type){
//重载验证码
var timenow = new Date().getTime();
if (type)
{
$('verifyImg').src= '__URL__/verify/adv/1/'+timenow;
}else{
$('verifyImg').src= '__URL__/verify/'+timenow;
}
}
if ( window != top){ window.top.location =window.location;}
</SCRIPT>
<IMG id="verifyImg" SRC="__URL__/verify/" onClick="fleshVerify()" BORDER="0" ALT="点击刷新验证码" style="cursor:pointer" align="absmiddle"></td>
function fleshVerify(){
function fleshVerify(){
try{
//重载验证码
var objshowImg = document.getElementById("showImg");
objshowImg.innerHTML = '<IMG id="verifyImg" SRC="__URL__/verify/" onClick="fleshVerify()" BORDER="0" ALT="点击刷新验证码" style="cursor:pointer" align="absmiddle">';
} catch(e){
alert(e);
}
}
</SCRIPT><td id="showImg">
<IMG id="verifyImg" SRC="__URL__/verify/" onClick="fleshVerify()" BORDER="0" ALT="点击刷新验证码" style="cursor:pointer" align="absmiddle">
</td>
//刷新验证码
$("#vimg").click(function(){
$("#vimg").attr("src","<%=request.getContextPath()%>/ManagerCodeServlet?"+Math.random());
});
});