android向webview加载的页面中填充账号密码并且自动登陆遇到问题求解

    public static String LOGIN = "http://ui.ptlogin2.qq.com/cgi-bin/login?appid=46000101&style=8&lang=&low_login=1&hide_title_bar=1&hide_close_icon=1&daid=6&hln_css=http://mat1.gtimg.com/www/mb/images/logo244x100.png&s_url=http%3A%2F%2Fw.t.qq.com%2Ftouch";

final String tencent_url = LOGIN;
try {

            String js = FileUtils.readAssetsFile("oauthfortencent.js", TencentWeiboActivity.this);

            js = js.replace("%u%", tAccount).replace("%p%", tPassword);

            Document dom = Jsoup.connect(LOGIN).get();
            html = dom.toString();
            html = html.replace("</head>", js + "</head>")
                    .replace("action-type=\"submit\"", "action-type=\"submit\" id=\"submit\"");
            return html;
        } catch (Exception e) {
            e.printStackTrace();
        }
                mWebView.loadDataWithBaseURL("http://open.qq.com/", html, "text/html", "UTF-8", "");

js代码:

function fillAccount(){ document.getElementById("u").value = '%u%'; document.getElementById("p").value = '%p%'; document.getElementById("go").click(); }

原本网页应该是这样子的
图片说明
填充之后
图片说明
而且登录按钮不能被点击
我应该怎么弄才可以,谢谢

你的替换有问题,建议你注入js代码,实现填表。而不是直接替换html