<!--[if lte IE 7]>
<script>window.location.href='http://microsoft.com';</script>
<![endif]-->
请问这一段代码可以在IE7下面转跳页面吗(好像不行)?如果不行,该怎么写才能做到在IE7下转跳到另一个页面?
哈哈,没猜错的话,你是要提醒用户版本升级吧?看了下,是可以的,可能是你的注释放的位置不对,需要放到body
中。
html
<body> <!--[if lte IE 7]> <script type="text/javascript">window.location.href="http://www.baidu.com"</script> <![endif]-->
可以参考本身的html代码。