jquery focus not working on a page loaded with ajax

前端 未结 3 526
灰色年华
灰色年华 2021-01-28 00:41

My code

index.php





        
3条回答
  •  无人共我
    2021-01-28 01:17

    As your Ajax code knows all about the inputs (same page), why not just do this:

      success: function(msg)
      {
          $("#risultati").html(msg);
          $("#zio").focus();
      },
    

    Your current version has a child page has knowledge of the parent page (bad separation).

提交回复
热议问题