Ìæ»»Select±êÇ©µÄjavascriptÀà
// ÏÂÀÁбíÀà
// PubEdition: Version 1.0.0.0
// ModifyDate: 2009-12-09 9:30:00
// FinishDate: 2009-12-09 9:30:00
// AuthorName: binbin( Mail:pl45@163.com / Tel:13893302154 )
var droplistswap=function(){};
droplistswap.prototype.originalElement=new Array();
// droplistswap.prototype.hidedroplist=function(evt){
// var my = this;
// var _event = window.event?window.event:evt;
// var obj = _event.toElement?_event.toElement:_event.relatedTarget;
// while( obj!=null && obj.id!="droplistElement"){
// obj = obj.parentNode;
// }
// if(obj==null)document.getElementById("droplistElement").style.display="none";
// }
droplistswap.prototype.initialize=function(DropID,index){
var my = this;
my.originalElement.push(document.getElementById(DropID));
var selectElement=document.createElement('div');
selectElement.innerHTML="<label>"+document.getElementById(DropID).options[document.getElementById(DropID).selectedIndex].text+"</label>";
//selectElement.style.position="relative";
selectElement.id="selectElement"+index;
selectElement.className="droplistswap";
//selectElement.style.width="80px";
selectElement.style.top=document.getElementById(DropID).style.top;
selectElement.style.left= document.getElementById(DropID).style.left;
document.getElementById(DropID).parentNode.appendChild(selectElement);
document.getElementById(DropID).style.display="none";
//functionµÄ²ÎÊýÃû³Æ²»ÄܺÍÀà³ÉÔ±µÄ²ÎÊýÃû³ÆÏàͬ
// my.addEventListener(document,"click",function(event){my.hidedroplist.call(my,event)});
my.addEventListener(selectElement,"click",function(event,p_ID,p_Index){my.handledroplist.call(my,event,DropID,index)});
}
droplistswap.prototype.handledroplist=function(evt,DropID,OriIndex)
{
var my = this;
//alert(OriIndex);
var _event = window.event?window.event:evt;
// if( _event == null ||typeof(_event) == 'undefined'){
// var _fun = my
Ïà¹ØÎĵµ£º
scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐĿǰ¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×î¶¥¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×î¶¥¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......
Òý×Ô£ºhttp://blog.csdn.net/lsj19830812/archive/2007/10/25/1843578.aspx
a.jspÊÇÒª´òÓ¡µÄÒ³Ãæ
<html>
<head>
<script language="javascript">
function fmtPrint(printPlace,w,h){
var sarg=new Array();
var sdata=document.all.item(printPlace);
sarg[0]=s ......
"^\d+$"¡¡¡¡//·Ç¸ºÕûÊý£¨ÕýÕûÊý + 0£©
"^[0-9]*[1-9][0-9]*$"¡¡¡¡//ÕýÕûÊý
"^((-\d+)|(0+))$"¡¡¡¡//·ÇÕýÕûÊý£¨¸ºÕûÊý + 0£©
"^-[0-9]*[1-9][0-9]*$"¡¡¡¡//¸ºÕûÊý
"^-?\d+$"¡¡¡¡¡¡¡¡//ÕûÊý
"^\d+(\.\d+)?$"¡¡¡¡//·Ç¸º¸¡µãÊý£¨Õý¸¡µãÊý + 0£©
"^(([0 ......
http://www.cnblogs.com/sanshi/archive/2009/07/08/1519036.html
Ò»¡¢sanshi javascript ¼Ì³ÐϵÁУº
1¡¢ JavaScript¼Ì³ÐÏê½â£¨Ò»£© http://www.cnblogs.com/sanshi/archive/2009/07/08/1519036.html
2¡¢JavaScript¼Ì³ÐÏê½â£¨¶þ£©
3¡¢ JavaScript¼Ì³ÐÏê½â£¨Èý£©
4¡¢JavaScript¼Ì³ÐÏê½â£ ......
1£®ÈçºÎ»ñÈ¡±íµ¥<select>ÓòµÄÑ¡Ôñ²¿·ÖµÄÎı¾£¿
<form name="a">
<select name="a" size="1" onchange="_sel(this)">
<option value="a">1</option>
<option value="b">2</option>
<option value="c">3</option>
</select>
</form&g ......