Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的网页包含两个文本框。默认情况下,页面焦点在第一个文本框上。当我在第一个文本框中键入第三个字符时,我希望控件自动转移到第二个文本框。任何人都可以帮忙吗?
function ThirdCharPressed(){ var char=1; $('#yourtextbox').keypress(function() char++; if(char==3) $('#yourSecondtextbox').foucus(); }); }
我猜这可能有用