Set focus to field in dynamically loaded DIV

前端 未结 10 1232
心在旅途
心在旅途 2020-12-08 04:26

What is the proper method to set the focus to a specific field within a dynamically loaded DIV?

$(\"#display\").load(\"?control=msgs\"); // loads the HTML in         


        
10条回答
  •  悲哀的现实
    2020-12-08 04:45

    Dynamically added items have to be added to the DOM... clone().append() adds it to the DOM... which allows it to be selected via jquery.

提交回复
热议问题