很漂亮,比较适合女性一类比较温馨的网站
// viaselect environment constants
var ss_env = new object();
ss_env.ie_version = new number(((window.navigator.appversion.split('; '))[1].split(' '))[1]);
ss_env.cr = new object();
ss_env.cr.reversebackground = '#e2519c';
ss_env.cr.reversetext = 'white';
ss_env.cr.border = '#d55c9a';
ss_env.cr.borderactive = '#ff6cb7';
ss_env.imgprefix = 'http://www.viafriend.com/images';
ss_env.defaultheight = 20;
ss_env.buttonwidth = 13;
ss_env.optionsdivstyle = ''
+ ' display:none;'
+ ' z-index:10;'
+ ' position:absolute;'
+ ' border:1 solid '+ ss_env.cr.border+';'
+ ' background-color:white;'
+ ' scrollbar-face-color:#d4d0c8;'
+ ' scrollbar-shadow-color:white;'
+ ' scrollbar-highlight-color:#f6f5f4;'
+ ' scrollbar-3dlight-color:white'
+ ' scrollbar-darkshadow-color:#86837e;'
+ ' scrollbar-track-color:#f6f5f4;'
+ ' scrollbar-arrow-color:#86837e;';
ss_env.optionnobrstyle = ''
+ ' font-size:12px;'
+ ' font-family:奔覆;';
// sayselect variables
var ss_var = new object();
ss_var.divdummy = document.createelement("div");
ss_var.selectlist = new array();
ss_var.beventattached = false;
var ss_createdelements = new object();
function unloadobjects()
{
try {
if (ss_var && ss_var.selectlist)
{
for (key in ss_var.selectlist)
{
if (ss_var.selectlist[key])
{
try {
ss_var.selectlist[key].select.setattribute('ss', 0);
} catch (e) {};
delete ss_var.selectlist[key];
}
}
}
} catch (e) {};
}
attachevent("onunload", unloadobjects);
function ss_create (srchtml, listmax, bautodetect)
{
// property
this.ssid = ss_var.selectlist.length;
this.boriginalselect = (bautodetect && 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 < 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;
}
}
}
function ss_handlepropertychange ()
{
if ('propertychange'==window.event.type && 'selectedindex'==window.event.propertyname) {
var oss = window.event.srcelement.ss;
oss.syncselectedindex();
if (null != oss.select.onchange)
oss.select.onchange();
}
}
function ss_handlemousewheel (event)
{
var idx = this.selectedindex;
if ('mousewheel'==event.type && this.bfocused && this.breverse) {
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 <= this.optionstable.offsetwidth) {
this.toggleoptions(false);
this.select.selectedindex = math.floor(event.offsety / this.optionheight);
}
}
function ss_createtable ()
{
this.table = ss_createelement(""
+ "
"
);
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 < this.options.length; i++) {
this.createoptiontr(i);
}
this.syncoptions();
this.optionswrapper = document.createelement(""
+ ""
);
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);
}
ss_write("\n"
+" 不限\n"
+"水瓶座"
+"双鱼座"
+"白羊座"
+"金牛座"
+"双子座"
+"巨蟹座"
+"狮子座"
+"处女座"
+"天秤座"
+"天蝎座"
+"射手座"
+"摩羯座"
+"\n");
ss_write("\n"
+"都行\n"
+"北京"
+"上海"
+"天津"
+"重庆"
+"安徽"
+"福建"
+"甘肃"
+"广东"
+"广西"
+"贵州"
+"海南"
+"河北"
+"黑龙江"
+"河南"
+"湖北"
+"湖南"
+"内蒙古"
+"江苏"
+"江西"
+"吉林"
+"辽宁"
+"宁夏"
+"青海"
+"山西"
+"陕西"
+"山东"
+"四川"
+"江西"
+"西藏"
+"新疆"
+"云南"
+"浙江"
+"其它"
+"\n",8);
[ctrl+a 全选 注:如需引入外部js需刷新才能执行]