下面是我通过ajax加载的表单.当我直接运行表单页面然后自动对焦c_name在Firefox中工作但是当加载ajax时它不会!虽然它与opera / safari / chrome一起工作正常!
原文链接:https://www.f2er.com/ajax/159902.html<form action="client_entry_action.PHP" method="post" id="client_entry_form" name="client_entry_form"> <fieldset id="client_info_1"> <label for="c_name">Name:</label> <input type="text" name="c_name" required placeholder="Name" autofocus="autofocus" /> <label for="c_phone">Phone Number:</label> <input type="tel" name="c_phone" required placeholder="Mobile/Phone Number" /> <label for="c_email">Email:</label> <input type="email" name="c_email" required placeholder="email@example.com" /> <label for="c_address">Address:</label> <textarea name="c_address" ></textarea> </fieldset> <fieldset id="client_info_2"> <label for="c_info">Additional notes:</label> <textarea name="c_info" ></textarea> <input type="submit" name="add_client" value="Add Client" /> </fieldset> </form>