Created
March 12, 2012 23:28
-
-
Save koba-ninkigumi/2025403 to your computer and use it in GitHub Desktop.
全角半角変換サンプル
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 lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<script src="https://raw.github.com/andrewplummer/Sugar/master/release/1.2.3/minified/sugar-1.2.3.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($){ | |
$("form#abc input:text[name=acct]").blur( function () { $(this).val($(this).val().hankaku()); } ); | |
$("form#abc input:text[name=address]").blur( function () { $(this).val($(this).val().zenkaku()); } ); | |
}); | |
</script> | |
</head> | |
<body> | |
<form id="abc"> | |
<input type="text" name="acct" value="" /> | |
<input type="text" name="address" value="" /> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment