$(document).ready(function(){ $("[op=getvc]").click(function(){ $("[op=getvc]").html("请稍等……"); if(token!=""){ var token=window.location.href+'&'; token=token.substring(token.indexOf("token=") + 6,token.indexOf("&")); } $.post("/getvcode",{token:token},function(data){$(".info").html(data); $("[op=getvc]").html("点击获取验证码");},"text"); return false; }); $("[op=relieve]").click(function(){ $("[op=relieve]").html("请稍等……"); if(token!=""){ var token=window.location.href+'&'; token=token.substring(token.indexOf("token=") + 6,token.indexOf("&")); } $.post("/relieve",{token:token},function(data){$(".info").html(data); $("[op=relieve]").html("请求解除异常");},"text"); return false; }); }); function copyLink(Id) { var oInput = document.createElement('input'); oInput.value = document.getElementById(Id).value; document.body.appendChild(oInput); oInput.select(); // 选择对象 document.execCommand("Copy"); // 执行浏览器复制命令 oInput.className = 'oInput'; oInput.style.display='none'; alert('复制成功'); }