我怎样才能运行这个 JavaScript
使用 perl
Mechanize
?
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();
}
最佳答案
$mech->form_name("Form1");
$mech->field("__EVENTTARGET", $eventTarget);
$mech->field("__EVENTARGUMENT", $eventArgument);
$mech->submit();
关于javascript - 如何在 Mechanize 中模拟 javascript?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35930464/