收 藏 投 稿 繁 体 RSS 
站长吧-中国站长学习与交流的网站
首 页 运 营 学 院 建 站 论 坛
Web master8.net  
 网站运营  
  欢迎在本站发布信息,在线投递稿件请点这里。编辑QQ:4908220,欢迎联系交流。
业界动态 创业故事 推广研究 策划盈利 电子商务 企业平台
  站长工具
SEO查询 Whois查询 Pr查询 域名查询 IP查询 网页编辑器
 建站服务  
  如有建站意向,请尽快联系我们,以便安排时间... 建站服务 QQ4908220 QQ:4908220
作品展示 服务范围 服务流程 服务报价 联系方式 付款方式
文章正文  » 您的当前位置: 首页 >> 学院 >> 网页设计 >> Dreamweaver
去掉了灰色倒三角的漂亮下拉列表
  来源:互联网 | 时间:2006-09-27 | 浏览:   相关评论 | 报告错误 | 发布文章
【字号: | | 】 【背景色 杏仁黄 秋叶褐 胭脂红 芥末绿 天蓝 雪青 灰 银河白(默认色)
ect.selectedIndex = idx;
}
function SS_handleOverTitle ()
{
if (this.bExpanded)
return;

this.TitleTable.style.borderColor = SS_ENV.CR.BorderActive;
this.TitleTable.cells(1).style.display = 'none';
this.TitleTable.cells(2).style.display = 'block';
}
function SS_handleOutTitle ()
{
this.TitleTable.style.borderColor = SS_ENV.CR.Border;
this.TitleTable.cells(2).style.display = 'none';
this.TitleTable.cells(1).style.display = 'block';
}
function SS_handleOverOption (idx)
{
for (var i=0; i < this.options.length; i ) {
if (i==idx)
this.turnOnOption(i);
else
this.turnOffOption(i);
}
}
function SS_turnOnOption (idx)
{
this.OptionsTable.cells(idx).style.color = SS_ENV.CR.ReverseText;
this.OptionsTable.cells(idx).style.backgroundColor = SS_ENV.CR.ReverseBackground;
}
function SS_turnOffOption (idx)
{
this.OptionsTable.cells(idx).style.color = '';
this.OptionsTable.cells(idx).style.backgroundColor = '';
}
function SS_adjustOptionsDiv ()
{
if (this.bOriginalSelect) return;

this.OptionsDiv.style.width = this.width;
this.OptionsDiv.style.height = Math.min(this.options.length, this.ListMax) * this.OptionHeight 2;
this.OptionsWrapper.style.height = this.options.length * this.OptionHeight;
this.OptionsDiv.style.overflowY = (this.options.length > this.ListMax) ? 'scroll' : '';

var top = this.Table.offsetTop;
var left = this.Table.offsetLeft;
for (var El = this.Table.offsetParent; 'BODY'!=El.tagName && 'absolute'!=El.style.position && 'relative'!=El.style.position; El = El.offsetParent) {
if ('TABLE' != El.tagName) {
top = El.clientTop;
left = El.clientLeft;
}
top = El.offsetTop;
left = El.offsetLeft;
}
this.OptionsDiv.style.top = (this.bListDown) ? (top this.height) : (top - parseInt(this.OptionsDiv.style.height));
this.OptionsDiv.style.left = left;

this.TitleWrapper.style.top = 0;
this.TitleWrapper.style.left = 0;
}
function SS_syncOptions ()
{
if (this.bOriginalSelect) return;

for (var i=0; i < this.options.length; i ) {
this.OptionsTable.cells(i).setAttribute('index', i);
if (this.OptionsTable.cells(i).childNodes(0).innerText != this.options[i].innerText)
this.OptionsTable.cells(i).childNodes(0).innerText = this.options[i].innerText;
}
}
function SS_pressTitle (event)
{
SS_cancelEvent(event);

this.srcElementOfLastMousedown = event.srcElement;

this.toggleOptions();
}
function SS_releaseTitle (event)
{
SS_cancelEvent(event);

if (this.isThisEventToBeCanceled(event)) return;

this.srcElementOfLastMousedown = null;
}
function SS_pressOption (event)
{
SS_cancelEvent(event);

this.srcElementOfLastMousedown = event.srcElement;
}
function SS_moveOption (event)
{
SS_cancelEvent(event);

if (this.isThisEventToBeCanceled(event)) return;
if (!(event.offsetX >= 0 && event.offsetX <= this.OptionsTable.offsetWidth)) return;

this.handleOverOption(Math.floor(event.offsetY / this.OptionHeight));
}
function SS_releaseOption (event)
{
SS_cancelEvent(event);

if (this.isThisEventToBeCanceled(event)) return;

this.srcElementOfLastMousedown = null;

if (event.offsetX >= 0 && event.offsetX <= this.OptionsTable.offsetWidth) {
this.toggleOptions(false);
this.select.selectedIndex = Math.floor(event.offsetY / this.OptionHeight);
}
}
function SS_createTable ()
{
this.Table = SS_createElement(""
"<table border=0 cellpadding=0 cellspacing=0 style='table-layout:fixed; cursor:default'>"
"<tr><td></td></tr>"
"</table>"
);
if (!isNaN(this.width))
this.Table.style.width = this.width;
this.Table.style.height = this.height;

if (!this.bOriginalSelect) {
this.createTitleDiv();
this.createOptionsDiv();
this.Table.cells(0).appendChild(this.TitleDiv);
this.Table.cells(0).appendChild(this.OptionsDiv);
}
else {
this.Table.cells(0).appendChild(this.select);
}
}
function SS_createTitleDiv ()
{
this.TitleDiv = SS_createElement(""
"<div style='position:relative; top:0; left:0;'>"
" <table border=0 cellpadding=0 cellspacing=1"
" height=" this.height
" bgcolor=white"
" style='table-layout:fixed; border:1 solid " SS_ENV.CR.Border ";'"
" onmouseover='SS_VAR.SelectList[" this.ssID "].adjustOptionsDiv()'"
" >"
" <tr>"
" <td><nobr style='text-oveflow:hidden;" SS_ENV.OptionNobrStyle "'></nobr></td>"
" <td width=" SS_ENV.ButtonWidth " align=center style='word-wrap:normal'></td>"
" <td style='display:none' width=" SS_ENV.ButtonWidth " align=center style='word-wrap:normal'></td>"
" <td style='display:none'></td>"
" </tr>"
" </table>"
"</div>"
);
this.TitleTable = this.TitleDiv.childNodes(0);
this.TitleTable.cells(0).childNodes(0).innerText = this.options[this.selectedIndex].innerText;
this.TitleTable.cells(1).innerHTML = "<img src="http://edu.chinaz.com/Get/Website/Dreamweaver/ SS_ENV.ImgPrefix /btn_down.gif" border=0 align=absmiddle>";
this.TitleTable.cells(2).innerHTML = "<img src="http://edu.chinaz.com/Get/Website/Dreamweaver/ SS_ENV.ImgPrefix /btn_down_s.gif" border=0 align=absmiddle>";
this.TitleTable.cells(3).appendChild(this.select);
this.TitleWrapper = document.createElement(""
"<img src="http://edu.chinaz.com/Get/Website/Dreamweaver/ SS_ENV.ImgPrefix /img_blank.gif""
" style='position:absolute; top:0; left:0; z-index:2; width:100%; height:" this.height ";'"
" onmouseover='SS_VAR.SelectList[" this.ssID "].handleOverTitle()'"
" onmouseout='SS_VAR.SelectList[" this.ssID "].handleOutTitle(); SS_VAR.SelectList[" this.ssID "].releaseTitle(window.event);'"
" onmousedown='SS_VAR.SelectList[" this.ssID "].pressTitle(window.event)'"
" ondblclick='SS_VAR.SelectList[" this.ssID "].pressTitle(window.event); SS_VAR.SelectList[" this.ssID "].releaseTitle(window.event);'"
" onmouseup='SS_VAR.SelectList[" this.ssID "].releaseTitle(window.event)'"
" onmousewheel='SS_VAR.SelectList[" this.ssID "].handleMousewheel(window.event)'"
" ondragstart='SS_cancelEvent(window.event)'"
">"
);
SS_CreatedElements[SS_CreatedElements.length] = this.TitleWrapper;
this.TitleDiv.appendChild(this.TitleWrapper);
}
function SS_createOptionsDiv ()
{
this.OptionsDiv = SS_createElement(""
"<div style='" SS_ENV.OptionsDivStyle "'"
" onscroll='SS_VAR.SelectList[" this.ssID "].moveOption(window.event)'"
" onmousedown='SS_cancelEvent(window.event)'"
">"
" <table border=0 cellpadding=0 cellspacing=0 width=100% style='table-layout:fixed'>"
" </table>"
"</div>"
);
this.OptionsTable = this.OptionsDiv.childNodes(0);
for (var i=0; i < this.options.length; i ) {
this.createOptionTr(i);
}
this.syncOptions();
this.OptionsWrapper = document.createElement(""
"<img src="http://edu.chinaz.com/Get/Website/Dreamweaver/ SS_ENV.ImgPrefix /img_blank.gif""
" style='position:absolute; top:0; left:0; width:100%;'"
" onmousedown='SS_VAR.SelectList[" this.ssID "].pressOption(window.event)'"
" onmousemove='SS_VAR.SelectList[" this.ssID "].moveOption(window.event)'"
" onmouseup='SS_VAR.SelectList[" this.ssID "].releaseOption(window.event)'"
" onmouseout='SS_VAR.SelectList[" this.ssID "].releaseOption(window.event)'"
" ondragstart='SS_cancelEvent(window.event)'"
">"
);
SS_CreatedElements[SS_CreatedElements.length] = this.OptionsWrapper;
this.OptionsDiv.appendChild(this.OptionsWrapper);
}
function SS_createOptionTr (idx)
{
idx = ('undefined'!=typeof(idx)) ? idx : this.options.length - 1;
var OptionTr = this.OptionsTable.insertRow(-1);
var OptionTd = document.createElement("<td height=" this.OptionHeight "></td>");
SS_CreatedElements[SS_CreatedElements.length] = this.OptionsTd;
OptionTd.appendChild(document.createElement("<nobr style='" SS_ENV.OptionNobrStyle "'></nobr>"));
OptionTr.appendChild(OptionTd);
}
</SCRIPT>
</head>
<body><script>SS_write("<select style='width:60;height:18px;font-size:12px' name=star>\n"
" <option value=\"\" selected>不限</option>\n"
"<option value=\"水瓶座\">水瓶座</option>"
"<option value=\"双鱼座\">双鱼座</option>"
"<option value=\"白羊座\">白羊座</option>"
"<option value=\"金牛座\">金牛座</option>"
"<option value=\"双子座\">双子座</option>"
"<option value=\"巨蟹座\">巨蟹座</option>"
"<option value=\"狮子座\">狮子座</option>"
"<option value=\"处女座\">处女座</option>"
"<option value=\"天秤座\">天秤座</option>"
"<option value=\"天蝎座\">天蝎座</option>"
"<option value=\"射手座\">射手座</option>"
"<option value=\"摩羯座\">摩羯座</option>"
"</select>\n");
</script><br>
<script>SS_write("<select name='province' style='width:60;height:18px;font-size:12px'>\n"
"<option value=\"\" selected>都行</option>\n"
"<option value=\"北京\">北京</option>"
"<option value=\"上海\">上海</option>"
"<option value=\"天津\">天津</option>"
"<option value=\"重庆\">重庆</option>"
"<option value=\"安徽\">安徽</option>"
"<option value=\"福建\">福建</option>"
"<option value=\"甘肃\">甘肃</option>"
"<option value=\"广东\">广东</option>"
"<option value=\"广西\">广西</option>"
"<option value=\"贵州\">贵州</option>"
"<option value=\"海南\">海南</option>"
"<option value=\"河北\">河北</option>"
"<option value=\"黑龙江\">黑龙江</option>"
"<option value=\"河南\">河南</option>"
"<option value=\"湖北\">湖北</option>"
"<option value=\"湖南\">湖南</option>"
"<option value=\"内蒙古\">内蒙古</option>"
"<option value=\"江苏\">江苏</option>"
"<option value=\"江西\">江西</option>"
"<option value=\"吉林\">吉林</option>"
"<option value=\"辽宁\">辽宁</option>"
"<option value=\"宁夏\">宁夏</option>"
"<option value=\"青海\">青海</option>"
"<option value=\"山西\">山西</option>"
"<option value=\"陕西\">陕西</option>"
"<option value=\"山东\">山东</option>"
"<option value=\"四川\">四川</option>"
"<option value=\"江西\">江西</option>"
"<option value=\"西藏\">西藏</option>"
"<option value=\"新疆\">新疆</option>"
"<option value=\"云南\">云南</option>"
"<option value=\"浙江\">浙江</option>"
"<option value=\"其它\">其它</option>"
"</select>\n",8); </script>
</body>
</html>


分页 [1] [2] [3]
master8
  • 上一篇:JavaScript 对象与数组参考大全
  • 下一篇:Skype出台海外赔偿方案

  • 我要投稿  打印本文  推荐本文  加入收藏  返回顶部  关闭窗口
    搜模板(www.somoban.com) 原创网站模板交易平台
    阿里妈妈再掀疯狂采购风,网站广告位严重告急,急召天下站长
    基于PHP+MySQL的整站、模块、插件开发等或者按需求实现相应功能;
基于各PHP主流建站系统CMS,BBS,BLOG等的模板定制,完全手写代码;
整站数据迁移或备份恢复;网页代码优化、重构;整站常规SEO优化;网站技术支持;
点击了解详情...
    站长论坛
    • 验证码: