Superfish是一款简洁的多级导航菜单插件。
使用步骤
1、添加对相关的js和css文件的引用
<link href="css/superfish.css" rel="stylesheet" media="screen" type="text/css" />
<script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>
<script type="text/javascript" src="js/hoverIntent.js"></script>
<script type="text/javascript" src="js/superfish.js"></script>
2、在指定的元素上调用 superfish() 函数
jQuery(function(){ jQuery('ul.sf-menu').superfish()})
3、在 body 中加入一下格式的html标签
<ul class="sf-menu">
<li>
<a href="#a">1级菜单</a>
<ul>
<li>
<a href="#aa">2级菜单</a>
</li>
<li>
<a href="#ab">2级菜单</a>
<ul>
<li><a href="#">3级菜单</a></li>
</ul>
</li>
</ul>
</li>
</ul>
css3是css3,js是js,ie6会兼容js不会兼容css3,你问的是css3的动画属性之类的吧,那就别考虑ie6了,ie8都不支持,而且css3的属性新的浏览器都不是全部支持的,就别想ie6了,不可能。js运行跟浏览器有关,IE和火狐浏览器就有点区别;function verify(){
//0 Use Dom to get information from TextBox
var userName=document.getElementById("userName").value
//1 Create XMLHttpRequest Object
if (window.XMLHttpRequest)
{ //For FireFox,Opera...
xmlhttp = new XMLHttpRequest()
//Mistake the debug of the Mozillar
if(xmlhttp.overrideMimeType){
xmlhttp.overrideMimeType("text/html")
}
}
//For Internet Explorer6 5.5
else if(window.ActiveXObject)
{
//The Name of Activex
var activexName = ['MSXML2.XMLHTTP','Microsoft.XMLHTTP']
//Try to creat XMLHttpRequest Object
for(var n = 0n <MSXML.lengthn++)
{
try
{
xmlhttp = new ActiveXObject(activexName[n])
break
}
catch(e)
{
}
}
}
if(!xmlhttp){
alert("XMLHttpRequest is failed of creating!")
return
} else{
alert("Welcome!["+userName+"]")
}
//2 Registe the callback
xmlhttp.onreadystatechange=callback
//3 Set the connect information
//the 1 number is the way of http request
//the 2 number is the url address
//the 3 nubmer is the asy--(true) sy--(false)
xmlhttp.open("GET","AJAXServer?name="+userName,true)
//4 send the data,start to content the server
xmlhttp.send(null)
}
希望这段代码能够帮助到你。