然猫网今日用到的代码,分享如下:
首页
<link rel="alternate" media="only screen and (max-width: 640px)" href="/e/wap/" >
<meta name="mobile-agent" content="format=html5;url=/e/wap/" />
<meta name="mobile-agent" content="format=xhtml;url=/e/wap/" />
<meta http-equiv="Cache-Control" content="no-transform"/>
<script type="text/javascript">var url=location.search;if(url.indexOf("?pc")!=-1){}else{var is_iPd=navigator.userAgent.match(/(iPad|iPod|iPhone)/i)!=null;var is_mobi=navigator.userAgent.toLowerCase().match(/(ipod|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|win ce)/i)!=null;if(is_mobi&&window.location.search.indexOf("mv=fp")<0){window.location.href="/e/wap/"}}</script>
封面模板
<link rel="alternate" media="only screen and (max-width: 640px)" href="/e/wap/fm.php?bclassid=[!--self.classid--]" >
<meta name="mobile-agent" content="format=html5;url=/e/wap/fm.php?bclassid=[!--self.classid--]" />
<meta name="mobile-agent" content="format=xhtml;url=/e/wap/fm.php?bclassid=[!--self.classid--]" />
<meta http-equiv="Cache-Control" content="no-transform"/>
<script type="text/javascript">var url=location.search;if(url.indexOf("?pc")!=-1){}else{var is_iPd=navigator.userAgent.match(/(iPad|iPod|iPhone)/i)!=null;var is_mobi=navigator.userAgent.toLowerCase().match(/(ipod|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|win ce)/i)!=null;if(is_mobi&&window.location.search.indexOf("mv=fp")<0){window.location.href="/e/wap/fm.php?bclassid=[!--self.classid--]"}}</script>
列表模板
<link rel="alternate" media="only screen and (max-width: 640px)" href="/e/wap/list.php?classid=[!--self.classid--]" >
<meta name="mobile-agent" content="format=html5;url=/e/wap/list.php?classid=[!--self.classid--]" />
<meta name="mobile-agent" content="format=xhtml;url=/e/wap/list.php?classid=[!--self.classid--]" />
<meta http-equiv="Cache-Control" content="no-transform"/>
<script type="text/javascript">var url=location.search;if(url.indexOf("?pc")!=-1){}else{var is_iPd=navigator.userAgent.match(/(iPad|iPod|iPhone)/i)!=null;var is_mobi=navigator.userAgent.toLowerCase().match(/(ipod|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|win ce)/i)!=null;if(is_mobi&&window.location.search.indexOf("mv=fp")<0){window.location.href="/e/wap/list.php?classid=[!--self.classid--]"}}</script>
内容模板
<link rel="alternate" media="only screen and (max-width: 640px)" href="/e/wap/show.php?classid=[!--classid--]&id=[!--id--]" >
<meta name="mobile-agent" content="format=html5;url=/e/wap/show.php?classid=[!--classid--]&id=[!--id--]" />
<meta name="mobile-agent" content="format=xhtml;url=/e/wap/show.php?classid=[!--classid--]&id=[!--id--]" />
<meta http-equiv="Cache-Control" content="no-transform"/>
<script type="text/javascript">var url=location.search;if(url.indexOf("?pc")!=-1){}else{var is_iPd=navigator.userAgent.match(/(iPad|iPod|iPhone)/i)!=null;var is_mobi=navigator.userAgent.toLowerCase().match(/(ipod|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|win ce)/i)!=null;if(is_mobi&&window.location.search.indexOf("mv=fp")<0){window.location.href="/e/wap/show.php?classid=[!--classid--]&id=[!--id--]"}}</script>
还没有评论,来说两句吧...