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?

'rfid' is the name given to textfield


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



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