@xlou/webtools
Version:
Frontend Development Tools
32 lines • 816 B
HTML
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>webtools</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<script src="../dist/umd/webtools.min.js"></script>
<style></style>
</head>
<body>
<div class="app">
<input type="text" id="content">
<button onclick="copy()">复制</button>
</div>
<script>
const base64 = new tools.Base64()
console.log({
obj: base64,
key: base64.key,
encode: base64.encode("原神启动"),
decode: base64.decode("5Y6f56We5ZCv5Yqo")
})
function copy() {
tools.clipboardWrite(content.value)
.then(() => {
console.log("复制成功")
})
}
</script>
</body>
</html>