-
-
Save JeongInyoung/89dfed990761144dcca0328d40036f48 to your computer and use it in GitHub Desktop.
Revisions
-
riix revised this gist
Jul 24, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,14 +7,14 @@ <script type="text/javascript"> <!-- // $(function(){ $('input[type="submit"]:eq(0)').on('click', function(event){ event.preventDefault(); var a = $('#a').val(); var stringC = $('input[type="radio"]:checked').val().split('|'); var b = parseInt(( a / stringC[0] ) * stringC[1]); $('#b').val(b); }); $('input[type="submit"]:eq(1)').on('click', function(event){ event.preventDefault(); var b = $('#b').val(); var stringC = $('input[type="radio"]:checked').val().split('|'); -
riix renamed this gist
Jul 24, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
riix created this gist
Jul 24, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,52 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="ko"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Document</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" charset="utf-8"></script> <script type="text/javascript"> <!-- // $(function(){ $('input[type="submit"]:eq(0)').bind('click', function(event){ event.preventDefault(); var a = $('#a').val(); var stringC = $('input[type="radio"]:checked').val().split('|'); var b = parseInt(( a / stringC[0] ) * stringC[1]); $('#b').val(b); }); $('input[type="submit"]:eq(1)').bind('click', function(event){ event.preventDefault(); var b = $('#b').val(); var stringC = $('input[type="radio"]:checked').val().split('|'); var a = parseInt(( b / stringC[1] ) * stringC[0]); $('#a').val(a); }); }); // --> </script> </head> <body> <form> <p> <label><input type="radio" class="radio" name="group_radio" id="radio_1" checked="checked" value="16|9" />16:9</label> <label><input type="radio" class="radio" name="group_radio" id="radio_2" value="16|10" />16:10</label> <label><input type="radio" class="radio" name="group_radio" id="radio_3" value="6|4" />6:4</label> <label><input type="radio" class="radio" name="group_radio" id="radio_4" value="4|3" />4:3</label> </p> <p> <label>가로 <input type="text" id="a" class="txt" value="720" /></label> <input type="submit" id="submit" class="txt" value="가로 기준 계산" /> </p> <p> <label>세로 <input type="text" id="b" class="txt" value="720" /></label> <input type="submit" id="submit" class="txt" value="세로 기준 계산" /> </p> </form> </body> </html>