易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

Lua与javascript的差异


Lua与javascript的差异 - [lua学习]
 
转载
http://huazjxy.blogbus.com/logs/60132016.html
Lua模拟器js方案
1.语法级模拟
lua与js语言差异
1.1注释
js 为//,lua为--.
1.2变量
js利用val来声明全局变量不存在局部变量,lua则不需要直接定位则为全局变量,local声明则为局部变量。
1.3运算符
js
+ - ......

HTML+Javascript+XML


上面所说有关HTML的内容非常少又简单,但对已经了解的人来说就是没用的.
如有问题可到权威网 http://www.html.com/ 上查看
以下开始说说关于XML的一些知识.
XML也是标记语言,可它是自定义的,没有已给定格式.不具体说它,给出例子就可明了.

<NAME>TOM</NAME>
<SEX>M</SEX>
以上内容的< ......

JavaScript基础—对象

 从2004年下半年开始学习Web编程至今3年有余。从HTML,asp开始到现在的VS2008一路学过来,其中学的最多的还是服务器端编程,对客户端编程的学习还是不成系统。虽然在很多个系统里面应用过脚本,有些还起到了比较重要的作用。但一直是只知其然不知其所以然,用的是小心翼翼。现在脚本编程从以前的"雕虫小技"变成了一个Web开 ......

javascript格式化工具

有时候找到别人写的js代码是压缩过的,通过这个工具可以对代码进行格式化。
<html>
<head>
<title>JS格式化工具 </title>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<mce:style><!--
* { padding:0px; margin:5px; font-size:13px; font-fami ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号