去掉了灰色倒三角的漂亮下拉列表(3)_Dreamweaver教程

编辑Tag赚U币
教程Tag:暂无Tag,欢迎添加,赚取U币!

return true;
break;
case 'mousemove':
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 < SS_VAR.SelectList.length; i ) {
if (-1==except && SS_VAR.SelectList[i].bFocused && SS_VAR.SelectList[i].bExpanded) {
SS_VAR.SelectList[i].toggleOptions(false, true);
SS_VAR.SelectList[i].toggleTitle(true);
bHasToDetachEvent = false;
}
else if (i!=except) {
if (SS_VAR.SelectList[i].bExpanded)
SS_VAR.SelectList[i].toggleOptions(false, true);
if (SS_VAR.SelectList[i].bReverse)
SS_VAR.SelectList[i].toggleTitle(false);
SS_VAR.SelectList[i].bFocused = false;
}
}

if (SS_VAR.bEventAttached && bHasToDetachEvent) {
document.detachEvent('onmousedown', SS_blurExcept);
document.detachEvent('ondblclick', SS_blurExcept);
SS_VAR.bEventAttached = false;
}
}
function SS_syncSelectedIndex ()
{
this.selectedIndex = this.select.selectedIndex;

if (this.bOriginalSelect) return;

if (this.TitleTable.cells(0).childNodes(0).innerText != this.options[this.selectedIndex].innerText)
this.TitleTable.cells(0).childNodes(0).innerText = this.options[this.selectedIndex].innerText;
if (this.bExpanded)
this.toggleOptions(false);
}
function SS_toggleTitle (bReverse)
{
this.bReverse = ('undefined'!=typeof(bReverse)) ? bReverse: (!this.bReverse);
this.TitleTable.cells(0).style.backgroundColor = this.bReverse ? SS_ENV.CR.ReverseBackground : '';
this.TitleTable.cells(0).style.color = this.bReverse ? SS_ENV.CR.ReverseText : '';
}
function SS_toggleOptions (bExpanded, bStrict)
{
if (!bStrict && !this.bFocused) {
SS_blurExcept(this.ssID);
}
this.bExpanded = ('undefined'!=typeof(bExpanded)) ? bExpanded: (!this.bExpanded);
if (this.bExpanded) {
this.adjustOptionsDiv();
this.OptionsDiv.style.display = 'block';
if (!bStrict) {
this.toggleTitle(false);
this.handleOverOption(this.selectedIndex);
}
this.handleOutTitle();
}
else {
this.OptionsDiv.style.display = 'none';
if (!bStrict) {
this.toggleTitle(true);
}
}
if (!bStrict) {
this.bFocused = true;

if (!SS_VAR.bEventAttached) {
document.attachEvent('onmousedown', SS_blurExcept);
document.attachEvent('ondblclick', SS_blurExcept);
SS_VAR.bEventAttached = true;

来源:网上收集//所属分类:Dreamweaver教程/更新时间:2005-05-04
相关Dreamweaver教程