<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>点击复制</title>
</head>
<body>
推荐码 : <span id="copy-text">123456</span>
<a href="javascript:;" onclick="copyToClipboard('copy-text')" class="copy-btn">点击复制</a>
<script type="text/javascript">
function copyToClipboard(elementId) {
var aux = document.createElement("input");
var content = document.getElementById(elementId).innerHTML || document.getElementById(elementId).value;
aux.setAttribute("value", content);
document.body.appendChild(aux);
aux.select();
document.execCommand("copy");
document.body.removeChild(aux);
console.log('复制成功!直接粘贴即可');
}
</script>
</body>
</html> https://3gimg.qq.com/lightmap/v1/marker/index.html?marker=coord:37.6767600000,112.7297800000&key=TKUBZ-D24AF-GJ4JY-JDVM2-IBYKK-KEBCU&referer=p...
<!DOCTYPE html> <html> <head> <title></title> <meta charset="utf-8"> </head> <body>...
<!doctype html> <html> <head> <meta charset="utf-8"> <title>无标题文档</title> </head> ...
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>获取mac地址</title> </head&g...
代码1:<!--代码开始--> <script src="http://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js"></script> <script>...
通过FormData对象可以组装一组用 XMLHttpRequest发送请求的键/值对。它可以更灵活方便的发送表单数据,因为可以独立于表单使用。如果你把表单的编码类型设置为multipart/form-data ,则通过FormData传输的数据格式和表单通过submit() 方法传输的数据格式相同...