Dưới đây là hình thức tôi tải qua ajax. Khi tôi chạy trang mẫu trực tiếp sau đó tự động lấy nét trên c_name hoạt động trong firefox nhưng khi nạp với ajax nó không! Nó hoạt động tốt với opera/safari/chrome mặc dù!Thuộc tính lấy nét tự động của HTML5 không chỉ hoạt động trong FireFox khi <Form><input> được tải qua Ajax. TẠI SAO?
<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 protected]" />
<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>
Nó hoạt động tốt với opera/safari/chrome mặc dù! Bạn có thể vui lòng giải thích thêm một chút không? – Vishu7
Thông số kỹ thuật không xác định hành vi chính xác cho thuộc tính, vì vậy tất cả các triển khai liên quan đều thực sự tuân thủ đặc tả. Mô tả _does_ mô tả ý tưởng chung là gì, nhưng các trình duyệt khác nhau giải thích hành vi nào sẽ dẫn đến một cách khác nhau. –