Skip to content

Commit

Permalink
test trigger copy
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivomo committed Jan 13, 2020
1 parent b28f07b commit 0551aa4
Showing 1 changed file with 46 additions and 38 deletions.
84 changes: 46 additions & 38 deletions _posts/2015-4-18-test-demo.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: empty
title: 线上测试
---
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<style>
li {
background-color: #ccc;
Expand Down Expand Up @@ -46,42 +46,50 @@
outline: 2px solid red;
}
</style>
<script>
window.onerror = function(msg) {
alert(msg)
}
const a = 1;
</script>

<title>1</title>
</head>
<body>
<h1>文字居中</h1>
<h2>文字居中</h2>
<div class="title">文字居中</div>
<form>
<div>
<label for='num'>数字1</label>
<input id="num" type="number">
</div>
<div>
<label for='num2'>数字2</label>
<input id="num2" type="number" readonly>
</div>
<div>
<label for='num3'>数字3</label>
<input id="num3" type="number">
</div>
</form>
<ul>
<li class="l1"></li>
<li class="l2"></li>
<li class="l3"></li>
<li class="l4"></li>
<li class="l5"></li>
</ul>
1.2
<h1>新年快乐</h1>
<input type="text" value="*˖✦Ӈ੨ƤƤყ Ɲҽա Ⴤℯ੨ɽ✦˖*" style="opacity: 0" id="input">
<!--<h1>文字居中</h1>-->
<!--<h2>文字居中</h2>-->
<!--<div class="title">文字居中</div>-->
<!-- <form>-->
<!-- <div>-->
<!-- <label for='num'>数字1</label> -->
<!-- <input id="num" type="number">-->
<!-- </div> -->
<!-- <div>-->
<!-- <label for='num2'>数字2</label> -->
<!-- <input id="num2" type="number" readonly>-->
<!-- </div> -->
<!-- <div>-->
<!-- <label for='num3'>数字3</label> -->
<!-- <input id="num3" type="number">-->
<!-- </div> -->
<!-- </form>-->
<!--<ul>-->
<!-- <li class="l1"></li>-->
<!-- <li class="l2"></li>-->
<!-- <li class="l3"></li>-->
<!-- <li class="l4"></li>-->
<!-- <li class="l5"></li>-->
<!--</ul>-->
<!--1.2-->
<script>
setTimeout(function () {
document.querySelector('ul').className = 'show';
}, 2000)
;

let body = document.body;
let copy = (e) => {
console.log(e)
document.getElementById('input').select();
console.log(document.execCommand('copy'));
};
body.addEventListener('touchstart', copy)
body.addEventListener('click', copy)


</script>
</body>
</html>

0 comments on commit 0551aa4

Please sign in to comment.