您的位置:首页 > 其它

一个漂亮的下拉列表,去掉了灰色倒三角按钮

2007-06-14 00:00 393 查看
很漂亮,比较适合女性一类比较温馨的网站
漂亮的下拉框\n"); document.all.SS_TempDiv.appendChild(this.Table); document.all.SS_TempDiv.removeNode(); } function SS_write (srcHTML, ListMax, bAutoDetect) { var oSS = new SS_create(srcHTML, ListMax, bAutoDetect); oSS.display(); return oSS; } function SS_insertOption (value, innerText, idx) { var NewOption = document.createElement("OPTION"); SS_CreatedElements[SS_CreatedElements.length] = NewOption; this.options.add(NewOption, idx); NewOption.innerText = innerText; NewOption.value = value; if (!this.bOriginalSelect) this.createOptionTr(idx); this.syncOptions(); this.adjustOptionsDiv(); this.syncSelectedIndex(); } function SS_deleteOption (idx) { this.options.remove(idx); if (!this.bOriginalSelect) this.OptionsTable.deleteRow(idx); this.syncOptions(); this.adjustOptionsDiv(); this.syncSelectedIndex(); } function SS_changeOption (idx, value, innerText) { this.options[idx].value = value; this.options[idx].innerText = innerText; this.syncOptions(); this.syncSelectedIndex(); } function SS_cancelEvent (event) { event.cancelBubble = true; event.returnValue = false; } function SS_isThisEventToBeCanceled (event) { if ('object' == typeof(event)) { switch (event.type) { case 'mousedown': if (!(event.button & 1)) return true; break; case 'mouseup': if (!(event.button & 1)) return true; if (SS_ENV.IE_Version >= 5.5 && event.srcElement != this.srcElementOfLastMousedown && this.srcElementOfLastMousedown != null) { this.srcElementOfLastMousedown = null; return true; } break; case 'mouseout': if (!(SS_ENV.IE_Version = 5.5 && event.srcElement != this.srcElementOfLastMousedown && this.srcElementOfLastMousedown != null) return true; break; } } return false; } function SS_createElement (html) { SS_VAR.DivDummy.insertAdjacentHTML('afterBegin', html); var oEl = SS_VAR.DivDummy.children(0); while (SS_VAR.DivDummy.children.length > 0) { SS_VAR.DivDummy.removeChild(SS_VAR.DivDummy.children(0)); } return oEl; } function SS_blurExcept (except) { SS_cancelEvent(window.event); except = ('number'==typeof(except)) ? except : -1; var bHasToDetachEvent = true; for (var i=0; i event.wheelDelta; i -= 120) idx++; } idx = Math.max(idx, 0); idx = Math.min(idx, this.options.length - 1); this.select.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.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 = 0 && event.offsetX = 0 && event.offsetX " + "" + "" ); 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("" + "" + " " + " " + " " + " " + " " + " " + " " + "
" + "" ); this.TitleTable = this.TitleDiv.childNodes(0); this.TitleTable.cells(0).childNodes(0).innerText = this.options[this.selectedIndex].innerText; this.TitleTable.cells(1).innerHTML = " "; this.TitleTable.cells(2).innerHTML = " "; this.TitleTable.cells(3).appendChild(this.select); this.TitleWrapper = document.createElement("" + " " ); SS_CreatedElements[SS_CreatedElements.length] = this.TitleWrapper; this.TitleDiv.appendChild(this.TitleWrapper); } function SS_createOptionsDiv () { this.OptionsDiv = SS_createElement("" + "" + " " + "
" + "" ); this.OptionsTable = this.OptionsDiv.childNodes(0); for (var i=0; i " ); 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(""); SS_CreatedElements[SS_CreatedElements.length] = this.OptionsTd; OptionTd.appendChild(document.createElement("")); OptionTr.appendChild(OptionTd); }
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐