去掉了灰色倒三角的漂亮下拉列表(4)

2008-02-23 06:10:53来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折



  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="/Files/BeyondPic/chinazcj/2005-11/20/05112015561126430.gif" border=0 align=absmiddle>";

  this.TitleTable.cells(2).innerHTML = "<img src="/Files/BeyondPic/chinazcj/2005-11/20/05112015561169934.gif" border=0 align=absmiddle>";

  this.TitleTable.cells(3).appendChild(this.select);

  this.TitleWrapper = document.createElement(""

   "<img src="/Files/BeyondPic/chinazcj/2005-11/20/05112015561259287.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);'"

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇: DreamweaverMX创造网页鼠标样式

下一篇: 更加便捷实用!巧妙复制主页内容另一妙法