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

JavaScriptÀûÓÃDOM¸øÒ³ÃæÌí¼ÓÄÚÈÝ

×Ô¶¨ÒåÒ»¸ölogº¯Êý,Êä³ö´«È뺯ÊýµÄ¶ÔÏó»òÕßÐÅÏ¢.
Log.js
// JScript source code
function
log(category, message, object) {
// If this category is explicitly disabled, do nothing
if
(log.options[category + "Disabled
"]) return
;
// Find the container
var
id = category + "_log
";
var
c = document
.getElementById(id);
// If there is no container, but logging in this category is enabled,
// create the container.
if
(!c && log.options[category + "Enabled
"]) {
c = document
.createElement("div
");
c.id = id;
c.className = "log
";
document
.body.appendChild(c);
}
// If still no container, we ignore the message
if
(!c) return
;
// If timestamping is enabled, add the timestamp
if
(log.options.timestamp)
message = new
Date
() + ":
" + (message ? message : "");
// Create a element to hold the log entry
var
entry = document
.createElement("div
");
entry.className = category + "_message
";
if
(message) {
// Add the message to it
entry.appendChild(document
.createTextNode(message));
}
if
(object && typeof
object == "object
") {
entry.appendChild(log.makeTable(object, 0));
}
// Finally, add the entry to the logging container
c.appendChild(entry);
}
// Create a table to display the properties of the specified object
log.makeTable = function
(object, level) {
// If we've reached maximum recursion, return a Text node instead.
if
(level > log.options.maxRecursion)
return
document
.createTextNode(object.toString
());
// Create the table we'll be returning
var
table = document
.createElement("table
");
table.border = 1;
// Add a Name|Type|Value header to the table
var
header = docum


Ïà¹ØÎĵµ£º

javascriptЧÂʾ­Ñé̸(Ò»)

±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔ­À´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾­Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾­¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷Ô­Òò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......

JavaScript ÅжÏÉÏ´«ÎļþÀàÐÍ

function
 Check_FileType(str)
{
 
var
 pos 
=
 str.lastIndexOf(
"
.
"
);
 
var
 lastname 
=
 str.substring(pos,str.length)  //´Ë´¦Îļþºó׺ÃûÒ²¿ÉÓÃÊý×鷽ʽ»ñµÃstr.split(".")
 
if
 (lastname.toLowe ......

HTML+Javascript+XML


ÉÏÃæËù˵ÓйØHTMLµÄÄÚÈݷdz£ÉÙÓÖ¼òµ¥,µ«¶ÔÒѾ­Á˽âµÄÈËÀ´Ëµ¾ÍÊÇûÓõÄ.
ÈçÓÐÎÊÌâ¿Éµ½È¨ÍþÍø http://www.html.com/ Éϲ鿴
ÒÔÏ¿ªÊ¼ËµËµ¹ØÓÚXMLµÄһЩ֪ʶ.
XMLÒ²ÊDZê¼ÇÓïÑÔ,¿ÉËüÊÇ×Ô¶¨ÒåµÄ,ûÓÐÒѸø¶¨¸ñʽ.²»¾ßÌå˵Ëü,¸ø³öÀý×ӾͿÉÃ÷ÁË.
Èç
<NAME>TOM</NAME>
<SEX>M</SEX>
ÒÔÉÏÄÚÈݵÄ< ......

javascript³£ÓÃ

calcu()  ----º¯ÊýʵÏÖÁ½¸öÊýÏà³Ë
document.write();  ---´òÓ¡
document.calc.ÔªËØÃû.value;  --»ñµÃ±íµ¥µÄÖµ
document.±íµ¥Ãû¡£±íµ¥ÔªËØÃû¡£value  Ϊ±íµ¥¸³Öµ
¶¨Ò庯Êý£º
 function  Ãû×Ö()
 {
    //javaScriptÔ¤Óï¾ä
 }
 onClick="º¯ÊýÃû";  ......

javascript ÅжϷ½·¨ÊÇ·ñ´æÔÚ

µÚÒ»ÖÖ·½·¨ÈçÏÂ
if (typeof beforeReject != 'undefined' && beforeReject instanceof Function) {
beforeReject(nextStep);
}
µÚ¶þÖÖ·½·¨ÈçÏÂ
if (¶ÔÏóÃû.·½·¨Ãû)
{
//·½·¨´æÔÚ
¶ÔÏóÃû.·½·¨Ãû();
}
µÚÈýÖÖ·½·¨£º
if(typeof(nl.onBlue)=="function")
{
//´æÔÚ
} ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ