0
此代码在IE中不起作用,为什么不呢?在IE中添加div
$('body').append('<div id="iedialog"><h2 class="dialog-header">Alert!</h2><div class="dialog-container"><center>It looks like you are using Internet Explorer! Please switch to another browser to use all our Designer features. We recommend Firefox (<a href="www.firefox.com">www.firefox.com</a>) and Google Chrome (<a href="www.google.com/chrome">www.google.com/chrome</a>) for an overall better internet experience.<br /><br /><input type="button" value="OK" id="okiedialog"></center>');
然而,如果我复制并粘贴在控制台中的这个确切的代码,它的工作原理。
也许你在创建body之前调用它? – 2013-05-04 16:50:01
你什么时候运行上面的代码? – techfoobar 2013-05-04 16:50:53
作者golly,你是对的!我把这个代码放在body标签之前。现在正在工作。你想把它作为答案,所以我可以选择它吗? – user961627 2013-05-04 16:51:45