Skip to content

Instantly share code, notes, and snippets.

@867
Created Mar 9, 2014
Embed
What would you like to do?
フォームの日本語入力に対するフリガナを自動的に別フィールドに記入するJQueryプラグイン「autoKana.js」の実装方法
<body>
<form action="" method="">
<label for="user-name">お名前</label><input type="text" id="user-name"><br>
<label for="user-kana">フリガナ</label><input type="text" id="user-kana">
</form>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="/assets/js/jquery.autoKana.js"></script>
<script>
$(document).ready(function(){
$.fn.autoKana('#user-name', '#user-kana', {katakana:true});
});
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment