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

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

this.turnOffOption = SS_turnOffOption;
this.handleMousewheel = SS_handleMousewheel;
this.handleOverTitle = SS_handleOverTitle;
this.handleOutTitle = SS_handleOutTitle;
this.handleOverOption = SS_handleOverOption;
this.createTable = SS_createTable;
this.createTitleDiv = SS_createTitleDiv;
this.createOptionsDiv = SS_createOptionsDiv;
this.createOptionTr = SS_createOptionTr;
this.adjustOptionsDiv = SS_adjustOptionsDiv;
this.syncOptions = SS_syncOptions;
this.pressOption = SS_pressOption;
this.moveOption = SS_moveOption;
this.releaseOption = SS_releaseOption;
this.pressTitle = SS_pressTitle;
this.releaseTitle = SS_releaseTitle;

// public method
this.display = SS_display;
this.insertOption = SS_insertOption;
this.deleteOption = SS_deleteOption;
this.changeOption = SS_changeOption;

// initiate
this.createTable();
this.select.setAttribute('SS', this);
if (!this.bOriginalSelect)
this.select.onpropertychange = SS_handlePropertychange;
SS_VAR.SelectList[this.ssID] = this;
}
function SS_display ()
{
document.write("<div id=SS_TempDiv></div>\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))

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