Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 ¹¹Ô캯Êý myhere

/**
* JavaScript ÊÇÃæÏò¶ÔÏóµÄÓïÑÔ£¬µ«ÊÇËûµÄÃæÏò¶ÔÏó²»ÊÇ»ùÓÚÀàµÄ£¬ÊÇ»ùÓÚÔ­Ð͵Ä;
* µ«ÊÇËûµÄһЩÌØÐÔ(º¯ÊýÊÇÊý¾Ý)£¬Ê¹µÃËü¿ÉÒÔÄ£Äâ»ùÓÚÀàµÄÃæÏò¶ÔÏ󣬵«ÊÇ JavaScript ²¢²»Ö§³ÖºÍ Java Ò»ÑùµÄÀ࣬
* Òò´Ë JavaScript ÖеÄ"Àà"¿ÉÒÔ³Æ×÷"αÀà"
*/
//
/**
* ¹¹Ô캯Êý: js ÖÐÓÃÀ´ºÍ new ÔËËã·ûÒ»ÆðʹÓõĺ¯Êý³Æ× ......

ÀûÓÃhttpµÄrefererÍ·ºÍServletÒþ²ØJavaScript´úÂë

1.       ¶¨ÒåÒ»¸öÓÃÓÚÊä³öJavaScript´úÂë µÄServletÀà¡£
package com.mycompany.response.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServle ......

javascript³£ÓÃ

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

ÓÃjavascriptÏÔʾXML


ÓÃjavascriptÏÔʾXML
 
 
Äã¿ÉÒÔÓÃJavaScriptÏÔʾXML¡£¿ÉÒÔÓÃJavaScript (»ò VBScript)´ÓÒ»¸öXMLÎļþÖÐÊäÈëÊý¾Ý²¢ÔÚÒ»¸öHTMLÒ³ÃæÄÚÏÔʾXMLÊý¾Ý¡£ Òª¿´¿´XMLºÍHTMLÊÇÈçºÎÏ໥²¹³äµÄ£¬¿ÉÒÔÕâÑù×ö£ºÊ×ÏÈÕÒµ½XML Îĵµ(note.xml)£¬È»ºó´ò¿ªHTMLÎĵµ
 
  (note.htm)£¬Õâ¸öHTMLÎĵµÖаüº¬ÁËÔĶÁX ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ