总结一下。今天发现要删掉也不能直接删,要先disable.加也不能直接加,删也不能直接删。真是郁闷阿。哈哈。下面是最终方案
{
$(document.createElement("link")).attr({"rel":"stylesheet","type":"text/css","href":"xxx"}).appendTo("head");
//这里必须用CreateElement,否则由于innerHTML的缘故会导致错误,上一篇Blog里面已经阐述。
}
else{
$("link[@href=xxx]").attr({"disabled":true}).remove();
//这里必须先用disabled=true,否则由于浏览器的缘故会看不出结果。
//www.dc9.cn
}
顺便提一下Jquery的好多插件如Jquick插件可以fly on dom动态建立dom,可以与第一步结合。但是上面已经很简单了,没必要了。
嗯,就是这样。
不起作用啊,我试过了,FF下自然没有问题,但IE6、IE7下不会报错,但也 无法加载到CSS!
I just want to tell you that I am beginner to weblog and absolutely enjoyed your web blog. More than likely I’m planning to bookmark your website . You really have wonderful articles. Appreciate it for sharing with us your blog.
Ever since I left a comment on this web site I seem to be getting a substantial quantity of junk e-mail, have you sold my email to someone or something?