富贵资源网 Design By www.hznty.com
在这里先要感谢yahoo的工程师们无私的将他们的成果奉献出来——yui(yahoo! ui)
其实这是它自带的一个例子,我只是熟悉了一下,各种接口调用还是比较方便的
浏览:http://www.healdream.com/upload/html/tabview_test.html
复制代码 代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<head>
<title>TabView Test</title>
<link rel="stylesheet" type="text/css" href="tabview1.css">
<link rel="stylesheet" type="text/css" href="border_tabs1.css">
<script type="text/javascript" src="/UploadFiles/2021-04-02/yahoo.js"><script type="text/javascript" src="/UploadFiles/2021-04-02/dom.js"><script type="text/javascript" src="/UploadFiles/2021-04-02/event.js"><script type="text/javascript" src="/UploadFiles/2021-04-02/tabview.js"><script type="text/javascript">
var myTabs = new YAHOO.widget.TabView("demo");
YAHOO.example.init = function() {
var tabView = new YAHOO.widget.TabView('demo');
tabView.on('contentReady', function() {
obj=document.getElementById("nav");
dest=obj.getElementsByTagName("li");
for(var i=0;i<dest.length;i++){
this.getTab(i).set('activationEvent', 'mouseover');
}
});
};
YAHOO.example.init();
</script>
<style>
#demo{
border:1px solid #000000;
width:40%;
background-color:#c0c0c0;
padding:5px;
}
.yui-navset.yui-content{
padding:10px;
height:200px;
}
</style>
<div id="demo" class="yui-navset">
<ul class="yui-nav" id="nav">
<li class="selected"><a href="#tab1"><em>Tab One Label</em></a></li>
<li><a href="#tab2"><em>Tab Two Label</em></a></li>
<li><a href="#tab3"><em>Tab Three Label</em></a></li>
</ul>
<div class="yui-content">
<div><p>Tab One Content</p></div>
<div><p>Tab Two Content</p></div>
<div><p>Tab Three Content</p></div>
</div>
</div>
相对来说,代码已经很精炼了,相对其他相同效果的网页来说
其实这是它自带的一个例子,我只是熟悉了一下,各种接口调用还是比较方便的
浏览:http://www.healdream.com/upload/html/tabview_test.html
复制代码 代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<head>
<title>TabView Test</title>
<link rel="stylesheet" type="text/css" href="tabview1.css">
<link rel="stylesheet" type="text/css" href="border_tabs1.css">
<script type="text/javascript" src="/UploadFiles/2021-04-02/yahoo.js"><script type="text/javascript" src="/UploadFiles/2021-04-02/dom.js"><script type="text/javascript" src="/UploadFiles/2021-04-02/event.js"><script type="text/javascript" src="/UploadFiles/2021-04-02/tabview.js"><script type="text/javascript">
var myTabs = new YAHOO.widget.TabView("demo");
YAHOO.example.init = function() {
var tabView = new YAHOO.widget.TabView('demo');
tabView.on('contentReady', function() {
obj=document.getElementById("nav");
dest=obj.getElementsByTagName("li");
for(var i=0;i<dest.length;i++){
this.getTab(i).set('activationEvent', 'mouseover');
}
});
};
YAHOO.example.init();
</script>
<style>
#demo{
border:1px solid #000000;
width:40%;
background-color:#c0c0c0;
padding:5px;
}
.yui-navset.yui-content{
padding:10px;
height:200px;
}
</style>
<div id="demo" class="yui-navset">
<ul class="yui-nav" id="nav">
<li class="selected"><a href="#tab1"><em>Tab One Label</em></a></li>
<li><a href="#tab2"><em>Tab Two Label</em></a></li>
<li><a href="#tab3"><em>Tab Three Label</em></a></li>
</ul>
<div class="yui-content">
<div><p>Tab One Content</p></div>
<div><p>Tab Two Content</p></div>
<div><p>Tab Three Content</p></div>
</div>
</div>
相对来说,代码已经很精炼了,相对其他相同效果的网页来说
富贵资源网 Design By www.hznty.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
富贵资源网 Design By www.hznty.com
暂无评论...