链接用click怎么处理
<a href="javascript:winopenLink('url','700','500')">XXXXXX </a>
function winopenLink(url,width,height) {
var xposition = (screen.width - width) / 2;
var yposition = (screen.height - height) / 2;
theproperty= "width=" + width + ","
+ "height=" + height + ","
+ "location=no,"
+ "menubar=no,"
+ "resizable=yes,"
+ "scrollbars=yes,"
+ "status=yes,"
+ "titlebar=no,"
+ "toolbar=no,"
+ "hotkeys=no,"
+ "left=" + xposition + ","
+ "top=" + yposition;
window.open(url,'',theproperty);
}
现在就是想能够获得request.getHeaders("Referer")的值或者把这个值设为不空,查了下用
var e = document.createElement("a");
e.href = url;
document.body.appendChild(e);
e.click(); 能实现,但是,不是新开一个窗口。
能否新开一个窗口并且request.getHeaders("Referer") 不空。
------解决方案--------------------
JS貌似不能修改Referer,所以楼主要自己权衡了