基本上我想在用户使用移动设备时运行HTML代码。当我尝试这样做时它没有用(可能是因为我在JS标签中运行html。
<!--device detection-->
<script type="text/javascript">
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|OperaMini/i.test(navigator.userAgent) ) {
document.write('line1'+
'line2'+
'line3'+
'line4'+
'line5'+
'line6'+
'line7'+
'line8'+
'line9'+
'line10'+);
<!-- start of nivo. slider code-->
<!-- here i called the slider-->
<div id="slider">
<a href="">
<img src="../images/banner_01.jpg" alt="" title= "" /></a>
<img src="../images/banner_02.jpg" alt="" title="" /></a>
<img src="../images/banner_03.jpg" alt="" title="" /></a>
<img src="../images/banner_04.jpg" alt="" title="" /></a>
</div>
<!-- end of nivo. slider code-->
}
</script