私はマリオネットビューでこの機能を持っています
onShow: function(){
// $('#boxId').val("I am here");
$('#boxId').focus();
}
を使用する$('#boxId').val("I am here");
とうまく機能し、要素の値はI am here
です。しかし、その要素に集中しようとしてもうまくいきません。何が問題なのですか?
私も試しました
<input type="text" class="input_txt" id="boxId" maxlength="8" onload="$('#boxId').focus()">
と
onShow: function(){;
$(document).ready(function(){
$('#boxId').focus();
});
}
しかし、それもうまくいきませんでした。
最後に次で解決しました:
onShow: function(){
setTimeout(function(){
$('#boxId').focus();
},1000);
},