Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaScriptÈ¥³ý¿Õ¸ñµÄÈýÖÖ·½·¨ (trim)

<SCRIPT LANGUAGE="JavaScript">
<!--
// Trim() , Ltrim() , RTrim()
String.prototype.Trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
 
String.prototype.LTrim = function()
{
return this.replace(/(^\s*)/g, "");
}
 
String.prototype.RTrim = function()
{
return this.replace(/(\s*$)/g, "");
}
 
//-->
</SCRIPT>


Ïà¹ØÎĵµ£º

ÓÃJavaScript¼ì²éÎļþÊÇ·ñ´æÔÚ

function checkImgAddr(url){
var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("post",url,false);
xmlhttp.send();
if(xmlhttp.readyState==4){
if(xmlhttp.status==404){
return "File Not Exist.";
}else if(xmlhttp.status == 200){
re ......

Javascript ÖжÔHTML±àÂëºÍ½âÂëµÄ·½·¨

String.prototype.HTMLEncode = function() {
var temp = document.createElement ("div");
(temp.textContent != null) ? (temp.textContent = this) : (temp.innerText = this);
var output = temp.innerHTML;
temp = null;
return output;
}
String.prototype.HTMLDecode = function() {
var temp = doc ......

JavaScriptÈ¥³ý¿Õ¸ñµÄÈýÖÖ·½·¨ (trim)

ÄÚÈÝ´ÓÍøÉÏÊÕ¼¯,ÊÕ¼¯Ä¿µÄ½ö¹©Ñо¿¡¢Ñ§Ï°¡£Éæ¼°°æȨ»ò²»Ï£ÍûÊÕ¼ÄúµÄÎÄÕÂÇëÄú¼°Ê±ÓëÎÒÁªÏµ¡£
·½·¨Ò»:
¸öÈËÈÏΪ×îºÃµÄ·½·¨.²ÉÓõÄÊÇÕýÔò±í´ïʽ,ÕâÊÇ×îºËÐĵÄÔ­Àí.
Æä´Î.Õâ¸ö·½·¨Ê¹ÓÃÁËJavaScript µÄprototype ÊôÐÔ
ÆäʵÄ㲻ʹÓÃÕâ¸öÊôÐÔÒ»Ñù¿ÉÒÔÓú¯ÊýʵÏÖ.µ«ÕâÑù×öºóÓÃÆðÀ´±È½Ï·½±ã.
ÏÂÃæ¾ÍÀ´¿´¿´Õâ¸öÊôÐÔÊÇÔõôÀ´ÓÃµÄ ......

Javascriptº¯ÊýºÍʼþ

 
Ò»¡¢Ä¬ÈϺ¯Êý
JavaScriptÌṩÁËһЩĬÈϵĺ¯Êý
 
±àÂ뺯Êýescape()£º½«·Ç×Öĸ¡¢Êý×Ö×Ö·ûת»»³ÉASCIIÂë
ÒëÂ뺯Êýunescape()£º½«ASCIIÂëת»»³É×Öĸ¡¢Êý×Ö×Ö·û
ÇóÖµº¯Êýeval()
ÊýÖµÅжϺ¯ÊýisNaN()£ºÅжÏÒ»¸öÖµÊÇ·ñΪ·ÇÊýÖµÀàÐÍ
ÕûÊýת»»º¯ÊýparseInt()£º½«²»Í¬½øÖÆ£¨¶þ¡¢°Ë¡¢Ê®Áù½øÖÆ£©µÄÊýֵת»»³ÉÊ®½øÖ ......

Javascript±éÀúHtml Table(°üÀ¨ÄÚÈÝºÍ ÊôÐÔÖµ)


1: ±éÀú²¢Êä³öTableÖÐÖµ
<table id="tb">
    <tr>
       <td></td>
    </tr>
    <tr>
       <td></td>
    </tr>
</ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ