I would like to focus on a text input in a PhoneGap application when the page loads. I have tried the MooTools version $('entry').focus();
and document.getElementById('entry').focus()
when the DOM is ready.
This works fine when the HTML page is viewed in a normal web browser, but in the iPhone simulator running PhoneGap, it doesn't work.
Is there a way to focus on a form field for iPhones that forces the virtual keyboard to appear?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…