Jump to content

Document.createlement("link")?


sunicani

Recommended Posts

<script type="text/javascript" language="javascript">var Swidth=screen.width;var Surl="http://www.xxxbuy.com/";var Skin=["common.css","home.css"];var Skintemp;if (Swidth>=1280){Surl+="skin_1200";}else{Surl+="Skin";}for (var i=0;i<skin.length;i++){Skintemp=document.creatElement("link");Skintemp.type="text/css";Skintemp.rel="stylesheet";Skintemp.href=Srul+"/"+Skin;document.getElementByTagName("head")[0].appendChild(Skintemp);}</script><noscript><link type="text/css" rel="stylesheet" href="http://www.360buy.com/skin/common.css"/><link type="text/css" rel="stylesheet" href="http://www.360buy.com/skin/home.css"/></noscript>
as we can see from above that a kind of 'for' function combined with CSS was used to adjust page format. and, I really don't know what's the function of 'document.creatElement("link"), does it means a Link can be produced? for page format like 'common.css' and 'home.css'?any experts who can interpret this for me??thanks a lot
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...