JavaScript实现 panel的显示隐藏
<script language="javascript">
function closeOpen(Panel) {
var test = document.getElementById('Panel');
if (test.style.display == "none") {
test.style.display = "";
}
else {
test.style.display = "none";
}
}
</script>
<input id="Button1" type="button" value="显示隐藏panel" onclick="closeOpen('Panel1')" style="background-image: url('images/title_bg_hide.gif');" />
相关文档:
一般我們寫Notes For Web 程式時很長用到URL傳遞一些資訊,在Release 6 多支援了@UrlQueryString的公司來直接抓取URL參數,真是好用的公式阿.不過使用這個當然還是吃Server的資源(效能),能用 JavaScript ......
//Textarea maxlength
//flag:text框名字,num:限制的字节数
function maxLen(flag,num){
if(document.getElementById('lastMessage').value=="0" || document.getElementById('lastMessage').value==flag){
var i=document.getElementById(flag).value.replace(/[\u0 ......
js对文字进行编码涉及3个函数:escape,encodeURI,encodeURIComponent,相应3个解码函数:unescape,decodeURI,decodeURIComponent
1、 传递参数时需要使用encodeURIComponent,这样组合的url才不会被#等特殊字符截断。 ......
翻译:为之漫笔
链接:http://www.cn-cuckoo.com/2007/08/01/understand-javascript-closures-72.html
简介
基于对象的属性名解析
值的指定
值的读取
标识符解析、执行环境和作用域链
执行环境
作用域链与 [[scope]]
标识符解析
闭包
自动垃圾收集
构成闭包
通过闭包可以做什么?
例 1:为函数 ......
第一种:
+展开
-HTML
<html>
<head>
</head>
<body>
<form name="form1">
<input type="text" name="getinfo" value="http://www.shuwo.net" size="40"><button onclick="alert(document.form1.getinfo.value ......