I use javascript function below to focus input field or textarea when the web page is loaded. It works well in case of standard Android mobile web browsers. But the solution is not working in Safari mobile web browser.
Do you have any suggestions how to apply focus effect on input field or textarea, when the website is loaded in Safari for smartphones ?
<body onLoad="javascript: document.getElementById("email").focus();">
<input type="text" name="emailaddress" id="email" />
</body>