我正在创建一个优惠券产品,并希望在单击按钮时打开4个标签,这在firefox中发生,但在chrome中只有2个链接能够打开,其余两个被阻止。
这是我尝试过的,
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script>
$(function() {
$('[data-popup-open]').on('click', function(e) {
window.open('https://www.google.com');
window.open('http://www.facebook.com');
window.open('http://www.stackoverflow.com');
window.open(window.location.href);
});
});
</script>
</head>
<body>
<a class="btn" data-popup-open="popup-1" href="#">Open Popup #1</a>
</body>
</html>
答案 0 :(得分:4)
var req = WebRequest.Create("http://myserver/upload");
req.SendChunked=true;
req.method = "POST"
using(var s = req.GetRequestStream()){
while(queryResult.hasRow()){
byte[] buffer = queryResult.readRow();
s.write(buffer,0,buffer.Length);
}
}
resonse = req.getResponse();
用循环为我工作, https://jsfiddle.net/donS/6dcmsg4n/
答案 1 :(得分:0)
尝试:
window.open("https://www.google.com", '_blank');