请教一下,可以通过其他代码执行 JavaScript 的函数吗
資深大佬 : songdg 3
查看 HTML 源码发现有这样一个函数,我想知道能不能在其他代码中执行这个 call 函数。
function call(htmlurl, corpName) {
var width = 980;
var height = 620;
var left = (screen.availWidth – width) / 2;
var top = (screen.availHeight – height) / 2;
var option = “top=” + top + “,left=” + left + “,scrollbars=yes,toolbar=no,menubar=no,status=no,resizable=yes,”
+ “width=” + width + “,height=” + height;
var newwin = window.open(htmlurl + “&corpName=” + replaceSpecial(corpName), “EntityInfo”, option);
newwin.focus();
//newwin.focus();
//var newwin = window.open(htmlurl, “”, “top=150,left=150,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=800,height=600”);
newwin.focus();
}
function call(htmlurl, corpName) {
var width = 980;
var height = 620;
var left = (screen.availWidth – width) / 2;
var top = (screen.availHeight – height) / 2;
var option = “top=” + top + “,left=” + left + “,scrollbars=yes,toolbar=no,menubar=no,status=no,resizable=yes,”
+ “width=” + width + “,height=” + height;
var newwin = window.open(htmlurl + “&corpName=” + replaceSpecial(corpName), “EntityInfo”, option);
newwin.focus();
//newwin.focus();
//var newwin = window.open(htmlurl, “”, “top=150,left=150,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=800,height=600”);
newwin.focus();
}
<td> <a
href=”javascript:call(‘/aic/SearchCorporationTask?service=colligateSearchInterface&sFromSupervision=fromSupSearch&isUseDataCentre=true&entityNo=2a1567dd-0172-1000-e000-be000a0c0115′,’xx 有限公司’)”>91441900MA54N99999
</a></td>
大佬有話說 (9)