<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <body> <div id="dd"> <img src="ai2.gif" alt="" width="700" height="300" /> </div> <table> <tr align="left" valign="middle"> <td height="25"> <input type="radio" i ...
<script language="javascript" type="text/javascript"> var arr=new Array(); arr[0]=/[\`\~\!\@\#\$\%\^\&\*\(\)\+\\\]\[\}\{\'\;\:\"\/\.\,\>\<\]\s\|\=\-\?]/g; arr[1]=/[^\d]/g; //屏蔽输入的特殊字符 function filtecharacter(obj, index) { obj.value = obj.value.replace(arr[index], ""); } ...
写了下面这样一个JS方法,要做一个无刷新效果,上面加了一行注释 //发送请求,传递省ID获取下面所有的市 function sendProId(obj) { var o = obj; var id = o.value; if (id == "0") { var city = document.getElementById("city"); city.innerHTML = ""; return; } sendAjaxRequest("/LhCard/GeRen/uarea.do?method=getcity", "id", id, showcities); } 可是调用 ...
年默认加载到距离当前100年的年份,同时根据月份是否是闰年自动加载天数。。。 <table cellspacing="0" cellpadding="6" border="1"> <tr> <td> 出生日期: </td> <td bgcolor="#FFFFFF" class="td_left"> <select name="year" onchange="getDates()"> <script language="javascript" type="text/ ...
<IMG src="../upload/28/photo/9af62a737c76dfff775a9ea1b5d7eed5.jpg" onload="if(this.width>180){this.width=180;this.height=180*this.height/this.width;}" alt="欢迎你,feifei">
function addFavou(){ var curURL=document.location.href; if (window.sidebar) { window.sidebar.addPanel(document.title, curURL,""); } else if( document.all ) { window.external.AddFavorite(curURL, document.title); } else if( window.opera && window.print ) { return true; } }
引用 <title>表单验证类 Validator v1.01</title> <style> body,td{font:normal 12px Verdana;color:#333333} input,textarea,select,td{font:normal 12px Verdana;color:#333333;border:1px solid #999999;background:#ffffff} table{border-collapse:collapse;} td{padding:3px} input{height:20;} textarea{wi ...
引用 var xmlHttp; var dataDiv; var offsetEl; //create the XMLHttpRequest object function createXMLHttpRequest() { if (window.ActiveXObject) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } else { if (window.XMLHttpRequest) { xmlHttp = new XMLHttpRequest(); } } if (!xmlHttp) { ...
<BODY oncontextmenu="return false"> </BODY>
2007-10-26

支持多选的select

关键字: 支持多选的select
<html> <head> <title>支持多选的select</title> </head> </body> 全部添加与部分添加的实现: <table border=0 cellpadding=0 cellspacing=0> <form name=meizz> <tr> <td> <select name=list1 size=8 multiple ondblclick="moveOption(this, this.form.list2)"> <option value=A>aaaaaa ...
2007-10-26

图片移动不超出边界

关键字: 图片移动不超出边界
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>图片移动</TITLE> <META http-equiv=keywords content=keyword1,keyword2,keyword3> <META http-equiv=description content="this is my page"> <META http-equiv=content-type content="text/html; charset=U ...
2007-10-26

控制图片大小

关键字: 控制图片大小
/* 控制图片大小 ImgD:类型为img的input元素对象,一般传入this即可 maxwidth:待显示的图片的最大宽度 maxheight:待显示的图片的最大高度 调用示例: <input type="img" onload="DrawImage(this,80,80)"/> */ var flag=false; function DrawImage(ImgD,maxwidth,maxheight){ var image=new Image(); image.src=ImgD.src; if(image.wid ...
2007-10-26

验证选择的图片

关键字: 验证选择的图片
/* 验证选择的图片 fileId:file类型的input元素的id imgId:img类型的input元素的id 图片大小不超过2M */ function checkAllPic(fileId,imgId){ var fileObj=document.getElementById(fileId); var imgObj=document.getElementById(imgId); /* 是否找到元素 */ if(typeof(fileObj)=="object" && typeof(imgObj)= ...
2007-10-26

判断浏览器类型

关键字: 判断浏览器类型
/* 判断浏览器类型 */ function getOs() { var OsObject = ""; if(navigator.userAgent.indexOf("MSIE")>0) { return "MSIE"; } if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){ return "Firefox"; } if(isSafari=navigator.userAgent.indexOf("Safari")>0) ...
2007-08-03

第一个javascript prototype

关键字: prototype
     第一个javascript prototype      写完发觉javascript中的OO也是如此的令人happy      有人这样比喻prototype,说它就像JAVA,jquery就像ruby      今天第一次真正接触这个东东,还没有搞清它的精髓...      来日方长,总有一天会征服prototype,jquery的...     ...
weiweichen1985
搜索本博客
我的相册
E6c390da-d0cb-3350-97d4-83ec6586912c-thumb
2008-6-26
共 122 张
最近加入圈子
存档
最新评论