diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-04-09 16:24:31 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-04-09 16:24:31 +0800 |
| commit | cd7c2e8089dc4cf36a4e66107539c2d5d3af1b39 (patch) | |
| tree | 2841146e5039078bc33f22657082a35cfa71f070 | |
| parent | 2057d7b23a26cfb6b4333a1f23455026563471ec (diff) | |
reverse normal mode and reerse mode
changed eventlistner to .on = event
| -rw-r--r-- | main.js | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -120,12 +120,12 @@ function convert(input, mode) { return result; } -convertBtn.addEventListener("click", () => { - mode = modeBtn.value == "0" ? true : false; +convertBtn.onclick = event => { + mode = modeBtn.value == "0" ? false : true; var res = convert(input.value, mode); output.innerText = res; -}); +} -copyBtn.addEventListener("click", () => { +copyBtn.onclick = event => { navigator.clipboard.writeText(output.innerText); -});
\ No newline at end of file +}
\ No newline at end of file |
