I have a click handler for a specific link, inside that I want to do something similar to the following:
window.location = url
我需要这个才能在新窗口中打开url,我该怎么做呢?
I have a click handler for a specific link, inside that I want to do something similar to the following:
window.location = url
我需要这个才能在新窗口中打开url,我该怎么做呢?
你可以喜欢:
window.open('url', 'window name', 'window settings')
jQuery:
$('a#link_id').click(function(){
window.open('url', 'window name', 'window settings');
return false;
});
You could also set the target
to _blank
actually.