【发布时间】:2016-03-11 01:10:43
【问题描述】:
如何使用perl Mechanize 运行这个JavaScript?
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
theform = document.Form1;
}
else {
theform = document.forms["Form1"];
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
【问题讨论】:
-
使用metacpan.org/pod/… 可能会有所帮助....
-
是否需要安装 Firefox?因为它没有安装在我正在处理的服务器上。
-
是的,它需要 FF... :( 还有 Mozrepl 插件。
标签: javascript perl postback mechanize