Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<meta charset="utf-8">
<title>keydownのテスト</title>
<p id="label"></p>
<script>
document.onkeydown = function(e) {
var elem = document.getElementById("label");
if(elem.innerHTML == "") {
elem.innerHTML = "aaa";
} else {
elem.innerHTML = "";
}
return false;
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.