将焦点设置为动态加载的DIV中的特定字段的正确方法是什么?
- $("#display").load("?control=msgs"); // loads the HTML into the DIV
- $('#display').fadeIn("fast"); // display it
- $("tex#header").focus(); // ?? neither that
- $("input#header").focus(); // ?? nor that
- $('#display','#header').focus() // ?? nor that
- $("#header").focus(); // ?? nor that works
- <div id="display">
- <form id="newHeaderForm" class="dataform" action="/" method="post">
- <input id="to" type="hidden" value="22" name="to"/>
- <dl>
- <dt>Header</dt>
- <dd>
- <input id="header" class="large" type="text" name="header" value="" maxlength="128"/>
- </dd>
- </form>
- </div>
非常感谢!