在chrome控制台中获取有关弹出窗口阻止程序的错误(jsfiddle的chrome设置中出现异常)和完全不同的错误" InvalidAccessError:底层对象不支持参数或操作"在mozilla。这段代码正在小提琴中突然停止。是否有某种上限或我忽略了某种语法问题https://jsfiddle.net/3vjru5zp/20/
<input type="text" placeholder="Enter Domain (ex. domain.com)" id="input">
<button type="button" id="button">Click Me!</button>
$(document).ready(function() {
$('#button').click(function(e) {
var inputvalue = $('#input').val();
//Opens http www version in new tab
test = window.open('http://www.' + inputvalue, "test");
//Opens https www version in new tab
test2 = window.open('https://www.' + inputvalue, "test2");
//Opens http non www version in new tab
test3 = window.open('http://' + inputvalue, "test3");
//Opens https non www version in new tab
test4 = window.open('https://' + inputvalue, "test4");
//Submits a search in new window showing main version indexed in Google
test5 = window.open('http://google.com/search?q=' + 'site:' + inputvalue, "test5");
});
});