我的应用程序的网页用户正在尝试加载此链接:
<a href="javascript:DoSubmitScr('1B'); SetTextOption('Detailed');" id="btn_14" class="Button1" style="position:relative;width:190px;">
它试图调用这个 javascript 块:
function DoSubmitScr(scrval)
{
GlobalHelpUrl = HelpUrl;
document.getElementById("hScreen").name = "SCR";
document.getElementById("hScreen").value = scrval;
if (scrval.toUpperCase() == "1B" ) document.getElementById("main_iframe").scrolling = "no";
document.forms[0].target = "_parent";
document.forms[0].method = "post";
document.forms[0].action = "/wtouch/perinfo.exe/oper";
doSubmit();
}
现在我尝试做这个javascript:
[webView stringByEvaluatingJavaScriptFromString:@"document.getElementById('btn_14').click();"];
但它不起作用,当我尝试这样做时也不起作用:
[webView stringByEvaluatingJavaScriptFromString:@"DoSubmitScr('1B');"];
关于如何调用这个javascript方法的任何想法?
罗恩