Skip to content

Instantly share code, notes, and snippets.

@mukeshdak
Created February 22, 2020 15:25
Show Gist options
  • Save mukeshdak/182e78ca0d6fc900ea6a8cee24892f64 to your computer and use it in GitHub Desktop.
Save mukeshdak/182e78ca0d6fc900ea6a8cee24892f64 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/xesivex
<!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>
#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;
}
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