长按复制功能 -- 移动端安卓跟ios
html:
<p class="codeAnd">3024</p>
<input class="codeIos" type="text" value="3024" readonly />
script:
<script>
var codeAnd=$(".codeAnd");
var codeIos=$(".codeIos");
if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)){
codeIos.show();
codeAnd.hide();
}else{
codeAnd.show();
codeIos.hide();
}
</script>