1.请帮忙写一段html点击按钮后弹出可以复制的点击点击网页教程html源码对话框代码?
2.ç¹å»å¤å¶ä»£ç
请帮忙写一段html点击按钮后弹出可以复制的对话框代码?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<button>按钮</button>
</body>
<script>
document.querySelector("button").onclick = ({ target }) => {
alert("可以复制");
}
</script>
</html>
请采纳
ç¹å»å¤å¶ä»£ç
<script type="text/javascript">
function copyUrl2(obj)
{
var Url2=obj;//对象æ¯QQ
Url2.select(); //éæ©å¯¹è±¡
document.execCommand("Copy"); //æ§è¡æµè§å¨å¤å¶å½ä»¤
alert("å¤å¶æå,ç´æ¥å¨å°åæ ç²è´´å³å¯.");
}
</script>
<input type="text" value="è¾å ¥ä½ çQQ" size="" maxlength="" id="QQ">
<input type="button" onClick="copyUrl2(document.getElementById('QQ'))" value="å¤å¶å·¦è¾¹å 容" />
<input type="text" value="è¾å ¥ä½ çQQ2" size="" maxlength="" id="QQ2">
<input type="button" onClick="copyUrl2(document.getElementById('QQ2'))" value="å¤å¶å·¦è¾¹å 容" />
åè¿æ ·ç»ä»+个åæ°å°±å¯ä»¥äº~
2024-12-27 14:51
2024-12-27 14:16
2024-12-27 14:10
2024-12-27 14:09
2024-12-27 13:43
2024-12-27 13:23
2024-12-27 12:50
2024-12-27 12:28