Unable to focus on textfield on page load

I have a page having input textfield in it. I want it to be focused automatically with cursor in it on page load. Below are various ways i tried but nothing worked for me. Can someone please help me out to resolve this issue?

Appery('rfid').focus()
'rfid' is the name given to textfield

$("input:text:visible:first").focus();

$("#startScreen input:text").first().focus();

$('#Div').find('input:first').focus();

$(":input:first").focus();

These are various options i tried.
1 person has
this question
+1
Reply