2009-08-28から1日間の記事一覧
html側 <input type="text" onkeypress="hoge(event.keyCode);" /> JavaScript側 function hoge(code) { //エンターキー押下なら if(13 === code) { alert("エンターキーが押されたよ!"); } }
html側 <input type="text" onkeypress="hoge(event.keyCode);" /> JavaScript側 function hoge(code) { //エンターキー押下なら if(13 === code) { alert("エンターキーが押されたよ!"); } }