Created
February 22, 2020 15:25
-
-
Save mukeshdak/182e78ca0d6fc900ea6a8cee24892f64 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/xesivex
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"> | |
#result { | |
padding:20px; | |
font-size: 1.5em; | |
margin:20px; | |
background-color: bisque; | |
width:400px; | |
height: 50px; | |
} | |
body,input,button { | |
font-size: 1.5em; | |
Margin : 1em; | |
} | |
</style> | |
</head> | |
<body> | |
Square of | |
<input value="5" id="y"> </input> <br> | |
<button onmouseover="fun1();">Calculate</button> | |
<br> | |
<br> | |
<br> | |
Below is result. | |
<div id="result"> | |
. | |
</div> | |
<script id="jsbin-javascript"> | |
function fun1(){ | |
var x = document.getElementById("y").value; | |
var jt = ""; | |
while(x>0){ | |
x=x-1; | |
jt = jt + "<br>Jade"; | |
} | |
document.getElementById("result").innerHTML=jt; | |
} | |
</script> | |
<script id="jsbin-source-css" type="text/css">#result { | |
padding:20px; | |
font-size: 1.5em; | |
margin:20px; | |
background-color: bisque; | |
width:400px; | |
height: 50px; | |
} | |
body,input,button { | |
font-size: 1.5em; | |
Margin : 1em; | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">function fun1(){ | |
var x = document.getElementById("y").value; | |
var jt = ""; | |
while(x>0){ | |
x=x-1; | |
jt = jt + "<br>Jade"; | |
} | |
document.getElementById("result").innerHTML=jt; | |
}</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
#result { | |
padding:20px; | |
font-size: 1.5em; | |
margin:20px; | |
background-color: bisque; | |
width:400px; | |
height: 50px; | |
} | |
body,input,button { | |
font-size: 1.5em; | |
Margin : 1em; | |
} |
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
function fun1(){ | |
var x = document.getElementById("y").value; | |
var jt = ""; | |
while(x>0){ | |
x=x-1; | |
jt = jt + "<br>Jade"; | |
} | |
document.getElementById("result").innerHTML=jt; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment