Last active
July 19, 2017 10:55
-
-
Save rambhairao/2f5cf79e175a6915b01b39765e7546c7 to your computer and use it in GitHub Desktop.
JS Bin// source https://jsbin.com/qumoqim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
p{ | |
text-transform: uppercase; | |
cursor: pointer; | |
} | |
</style> | |
</head> | |
<body> | |
<p> PLAYER-1: </p> | |
<script id="jsbin-javascript"> | |
var nem = document.querySelector('p'); | |
nem.addEventListener('click', addfunction); | |
function addfunction(){ | |
var nm = prompt("Enter name :"); | |
nem.textContent = 'PLAYER-1:' +nm; | |
} | |
</script> | |
<script id="jsbin-source-css" type="text/css">p{ | |
text-transform: uppercase; | |
cursor: pointer; | |
}</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var nem = document.querySelector('p'); | |
nem.addEventListener('click', addfunction); | |
function addfunction(){ | |
var nm = prompt("Enter name :"); | |
nem.textContent = 'PLAYER-1:' +nm; | |
} | |
</script></body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment