阅读背景:

如何在html / javascript中创建“复制到剪贴板”按钮

来源:互联网 
<html>
<input type="button" id="btnSearch" value="Search" onclick="GetValue();" />
<p id="message" ></p>

<script>
function GetValue()
{
    var myarray= new Array("item1","item2","item3");
    var random = myarray[Math.floor(Math.random() * myarray.length)];
    //alert(random);
    document.getElementById("message").innerHTML=random;
}
</script>

</html>
<html>
<input type="button" id="btnSearch" valu



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: