Skip to content

Instantly share code, notes, and snippets.

@sarojrout
Created March 20, 2015 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sarojrout/ae6a571cb04a36c2ad98 to your computer and use it in GitHub Desktop.
Save sarojrout/ae6a571cb04a36c2ad98 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/puxuwi
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
p{
color:red;
}
</style>
</head>
<body>
<p id="paraText">This is a Awesome</p>
<input id='userText'>
<button id='changeText' onclick='changePara()'>change the text</button>
<script id="jsbin-javascript">
function changePara(){
var inputText = document.getElementById('userText').value;
document.getElementById('paraText').innerHTML=inputText;
}
</script>
<script id="jsbin-source-css" type="text/css">p{
color:red;
}</script>
<script id="jsbin-source-javascript" type="text/javascript">
function changePara(){
var inputText = document.getElementById('userText').value;
document.getElementById('paraText').innerHTML=inputText;
}</script></body>
</html>
function changePara(){
var inputText = document.getElementById('userText').value;
document.getElementById('paraText').innerHTML=inputText;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment