trigger login window
I do a JQuery trigger on a login button to auto login. It works fine in IE but in Firefox i get this login window. My question is:
Can I trigger the click on OK with jQuery?
j开发者_JS百科Query(document).ready(function(){
jQuery('.centerButton').trigger('click');
});
No. It is browser chrome and not part of the DOM so it isn't accessible.
You can not interact with windowed elements [prompts, alerts, etc] with JavaScript.
精彩评论