求助:每次点击复制按钮文本前面总有'document.write',麻烦各位帮看看哪里出错了,不胜感激
<!DOCTYPE html>
<html>
<head><meta charset="utf-8">
<style>
#biao1{
display: none !important;
}
</style>
<script type="text/javascript">
var arr_wx = [
'wx11','wx22','wx33','wx44','wx55','wx66','wx77','wx88','wx99','wx10'
];
var wx_index = Math.floor((Math.random()*arr_wx.length));
var bdorderwx = arr_wx[wx_index];
</script>
</head>
我是随机微信号<span><script type="text/javascript">document.write(bdorderwx);</script></span>
<div cols="20" id="biao1" >
<span><script type="text/javascript">document.write(bdorderwx);</script></span>
</div>
<script type="text/javascript">
function copyUrl2()
{
var Url2=document.getElementById("biao1").innerText;
var oInput = document.createElement('input');
oInput.value = Url2;
document.body.appendChild(oInput);
oInput.select();
document.execCommand("Copy");
oInput.className = 'oInput';
oInput.style.display='none';
alert('复制成功');
window.location.href="weixin://";
}
</script>
<input type="button" onClick="copyUrl2()" value="点击复制代码" />
</html>