Created
September 17, 2018 17:10
-
-
Save Anna-Myzukina/30f7d3346fdc68c27d6f4bc4103ec8af to your computer and use it in GitHub Desktop.
// source https://jsbin.com
This file contains hidden or 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 { | |
font-family: 'helvetica neue', helvetica, sans-serif; | |
letter-spacing: 1px; | |
text-transform: uppercase; | |
text-align: center; | |
border: 2px solid rgba(0,0,200,0.6); | |
background: rgba(0,0,200,0.3); | |
color: rgba(0,0,200,0.6); | |
box-shadow: 1px 1px 2px rgba(0,0,200,0.4); | |
border-radius: 10px; | |
padding: 3px 10px; | |
display: inline-block; | |
cursor:pointer; | |
} | |
</style> | |
</head> | |
<body> | |
<p>Player 1: Chris</p> | |
<script id="jsbin-javascript"> | |
var para = document.querySelector('p'); | |
para.addEventListener('click', updateName); | |
function updateName() { | |
var name = prompt('Enter a new name'); | |
para.textContent = 'Player 1: ' + name; | |
} | |
</script> | |
<script id="jsbin-source-css" type="text/css">p { | |
font-family: 'helvetica neue', helvetica, sans-serif; | |
letter-spacing: 1px; | |
text-transform: uppercase; | |
text-align: center; | |
border: 2px solid rgba(0,0,200,0.6); | |
background: rgba(0,0,200,0.3); | |
color: rgba(0,0,200,0.6); | |
box-shadow: 1px 1px 2px rgba(0,0,200,0.4); | |
border-radius: 10px; | |
padding: 3px 10px; | |
display: inline-block; | |
cursor:pointer; | |
}</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var para = document.querySelector('p'); | |
para.addEventListener('click', updateName); | |
function updateName() { | |
var name = prompt('Enter a new name'); | |
para.textContent = 'Player 1: ' + name; | |
}</script></body> | |
</html> |
This file contains hidden or 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
p { | |
font-family: 'helvetica neue', helvetica, sans-serif; | |
letter-spacing: 1px; | |
text-transform: uppercase; | |
text-align: center; | |
border: 2px solid rgba(0,0,200,0.6); | |
background: rgba(0,0,200,0.3); | |
color: rgba(0,0,200,0.6); | |
box-shadow: 1px 1px 2px rgba(0,0,200,0.4); | |
border-radius: 10px; | |
padding: 3px 10px; | |
display: inline-block; | |
cursor:pointer; | |
} |
This file contains hidden or 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
var para = document.querySelector('p'); | |
para.addEventListener('click', updateName); | |
function updateName() { | |
var name = prompt('Enter a new name'); | |
para.textContent = 'Player 1: ' + name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment