Forked from: oleg.jakushkin's forked: Random integer genarator with cool CSS (ht View Diff (17) forked: Random integer genarator with cool CSS (html5 but rounded corners work in IE5 ) mod AE bezmax Follow 2011-07-01 21:44:47 License: MIT License Fork1 Fav0 View613 Play Stop Reload Fullscreen Smart Phone Fork tree Readme JavaScript 29 lines HTML 27 lines CSS 17 lines forked: Random integer genarator with cool CSS (html5 but rounded corners work in IE5 ) mod AE // forked from oleg.jakushkin's "forked: Random integer genarator with cool CSS (html5 but rounded corners work in IE5 ) mod AE" http://jsdo.it/oleg.jakushkin/ihFr // forked from oleg.jakushkin's "Random integer genarator with cool CSS (html5 but rounded corners work in IE5 )" http://jsdo.it/oleg.jakushkin/53tv // forked from oleg.jakushkin's "forked: Random integer genarator with cool CSS (html5 but rounded corners work in IE5 )" http://jsdo.it/oleg.jakushkin/tMFx // forked from phenix.pink's "Random integer genarator with cool CSS (html5 but rounded corners work in IE5 )" http://jsdo.it/phenix.pink/iDcl function $(id) { return document.getElementById(id); } function randomInRange(start, end) { var rangeBegin = Math.min(start,end); var rangeEnd = Math.max(start,end); var rangeSize = rangeEnd-rangeBegin+1; var seed = Math.random(); var result = Math.round(Math.floor((seed*rangeSize)+rangeBegin)); return result; } function a() { val = $('val'); val.innerHTML = String(randomInRange($('fnt').value, $('lint').value)); } <div id="nifty"> <b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b> <h1>Random Value Generator</h1> <p><b>Input 2 integers to get one random between them!</b></p> <b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b> </div> <p/> <div id="nifty"> <b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b><div> <form> <h2>one int</h2><div> <input type="text" id="fnt" value="13"/> <br /> </div></form> <form> <h2>another int</h2> <div> <input type="text" id="lint" value="-666"/> <br /> </div> </form> <form><div> <input type="button" value="Generate!" ONCLICK="a()" /> </div> </form></div> <b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b> </div> <p/> <div id="nifty"> <b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b> <p id="val">Random Value will be desplayed here</p> <b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b> </div> <p/> forked: Random integer genarator with cool CSS (html5 but rounded corners work in IE5 ) mod AE body{padding: 5px;background-color: #FFF;font: 100.01% "Trebuchet MS",Verdana,Arial,sans-serif} h1,h2,p{margin: 0 10px} h1,h2{font-size: 250%;color: #FFF; text-shadow: 0px 1px 1px #000;} h2{font-size: 120%;} div#nifty{ margin: 0 1%;background: #9BD1FA} b.rtop, b.rbottom{display:block;background: #FFF} b.rtop b, b.rbottom b{display:block;height: 1px;overflow: hidden; background: #9BD1FA} b.r1{margin: 0 5px} b.r2{margin: 0 3px} b.r3{margin: 0 2px} b.rtop b.r4, b.rbottom b.r4{margin: 0 1px;height: 2px} p{color: #000;text-shadow: 0px 1px 1px #fff;padding-bottom:0.3em} input[type="button"], .eButton {width: 150px;padding: 5px 10px;word-wrap: break-word;height: auto;} ::-moz-selection, input::-moz-selection, textarea::-moz-selection { background-color: #fbfdfe; color: #ff6c24; text-shadow: 0px 1px 1px #258ffd;} ::selection , input::selection, textarea::-selection { background-color: #fbfdfe; color: #fff; text-shadow: 0px 1px 1px #258ffd;} // forked from oleg.jakushkin's "forked: Random integer genarator with cool CSS (html5 but rounded corners work in IE5 ) mod AE" http://jsdo.it/oleg.jakushkin/ihFr // forked from oleg.jakushkin's "Random integer genarator with cool CSS (html5 but rounded corners work in IE5 )" http://jsdo.it/oleg.jakushkin/53tv // forked from oleg.jakushkin's "forked: Random integer genarator with cool CSS (html5 but rounded corners work in IE5 )" http://jsdo.it/oleg.jakushkin/tMFx // forked from phenix.pink's "Random integer genarator with cool CSS (html5 but rounded corners work in IE5 )" http://jsdo.it/phenix.pink/iDcl function $(id) { return document.getElementById(id); } function randomInRange(start, end) { var rangeBegin = Math.min(start,end); var rangeEnd = Math.max(start,end); var rangeSize = rangeEnd-rangeBegin+1; var seed = Math.random(); var result = Math.round(Math.floor((seed*rangeSize)+rangeBegin)); return result; } function a() { val = $('val'); val.innerHTML = String(randomInRange($('fnt').value, $('lint').value)); } <div id="nifty"> <b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b> <h1>Random Value Generator</h1> <p><b>Input 2 integers to get one random between them!</b></p> <b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b> </div> <p/> <div id="nifty"> <b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b><div> <form> <h2>one int</h2><div> <input type="text" id="fnt" value="13"/> <br /> </div></form> <form> <h2>another int</h2> <div> <input type="text" id="lint" value="-666"/> <br /> </div> </form> <form><div> <input type="button" value="Generate!" ONCLICK="a()" /> </div> </form></div> <b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b> </div> <p/> <div id="nifty"> <b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b> <p id="val">Random Value will be desplayed here</p> <b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b> </div> <p/> body{padding: 5px;background-color: #FFF;font: 100.01% "Trebuchet MS",Verdana,Arial,sans-serif} h1,h2,p{margin: 0 10px} h1,h2{font-size: 250%;color: #FFF; text-shadow: 0px 1px 1px #000;} h2{font-size: 120%;} div#nifty{ margin: 0 1%;background: #9BD1FA} b.rtop, b.rbottom{display:block;background: #FFF} b.rtop b, b.rbottom b{display:block;height: 1px;overflow: hidden; background: #9BD1FA} b.r1{margin: 0 5px} b.r2{margin: 0 3px} b.r3{margin: 0 2px} b.rtop b.r4, b.rbottom b.r4{margin: 0 1px;height: 2px} p{color: #000;text-shadow: 0px 1px 1px #fff;padding-bottom:0.3em} input[type="button"], .eButton {width: 150px;padding: 5px 10px;word-wrap: break-word;height: auto;} ::-moz-selection, input::-moz-selection, textarea::-moz-selection { background-color: #fbfdfe; color: #ff6c24; text-shadow: 0px 1px 1px #258ffd;} ::selection , input::selection, textarea::-selection { background-color: #fbfdfe; color: #fff; text-shadow: 0px 1px 1px #258ffd;} use an iframe compat browser, deer Play on jsdo.it games Author Share ブログに埋め込む QR Tag Download Complete! Description What kind of game? Control Device Smartphone Controllerjsdo.it WebSocket Controller» Mouse Keyboard Touch Device Fullscreen Activated Inactivated jsdo.it games から削除する Submit Author bezmax Tweet Default Panel Auto play Screenshot Readme JavaScript HTML CSS Size Width: px Height: px code <script type="text/javascript" src="http://jsdo.it/blogparts/ggsp/js"></script> class css div form fun html html5 input layer random Tweet Twitter Discussion Questions on this code? Tags class css div form fun html html5 input layer random Forked sort by latest page views favorite forked forked: Random integer genarat oleg.jakushk 00 390 30/27/17 class css div form fun html html5 input layer random