jquery.autoKana.js https://github.com/harisenbon/autokana
<form>
<input type="text" id="user_name">
<input type="text" id="kana_name">
</form>
<script src="./jquery.autoKana.js"></script>
<script>
$(function() {
$.fn.autoKana('#user_name', '#kana_name', {
katakana : true //true:カタカナ、false:ひらがな(デフォルト)
});
});
</script>