**模拟器可能不能弹出软键盘** ~~~ <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <script> // 扩展API是否准备好,如果没有则监听“plusready"事件 if(window.plus) { plusReady(); } else { document.addEventListener("plusready", plusReady, false); } // 扩展API准备完成后要执行的操作 function plusReady() { document.getElementById("rjp").addEventListener("click", function() { var Context = plus.android.importClass("android.content.Context"); var InputMethodManager = plus.android.importClass("android.view.inputmethod.InputMethodManager"); var main = plus.android.runtimeMainActivity(); var imm = main.getSystemService(Context.INPUT_METHOD_SERVICE); imm.toggleSoftInput(0,InputMethodManager.SHOW_FORCED); }); } </script> </head> <body> <button id="rjp">弹出软键盘</button> </body> </html> ~~~