
javascript
杰弗瑞王
这个作者很懒,什么都没留下…
展开
-
javascript基礎知識整理
动态添加图片:document.getElementById("test").innerHTML = '';转载 2013-06-14 09:51:56 · 528 阅读 · 0 评论 -
js 驗證url
function check_it(){ var theurl=document.getElementById("testtesttest").value; var tomatch= #rules here#; if (tomatch.test(theurl)){ window.alert("URL OK."); return转载 2013-06-21 15:39:37 · 604 阅读 · 0 评论 -
innerHTML用法
用法:比如在中写了如下的代码:现在用top.innerHTML="..........";的方法就可以向这个id的位置写入HTML代码了。例如top.innerHTML="";就可以在top对应的位置出现一个button了!爽吧,在公告前加javascript就行老,直接改HTML。。。function Test(){ var转载 2013-07-02 18:29:08 · 584 阅读 · 0 评论 -
在javascript中將json字符串轉為json對象
Obviously you can do this unsafely with something like:var jsonobj = eval("(" + jsonstr + ')');but that leaves us vulnerable to the json string containing other code, which it seems very dangerous原创 2013-07-02 18:25:16 · 535 阅读 · 0 评论 -
点击显示/隐藏 一个div
add-new-block为div的class名称$(document).ready(function(){ $(".add-new-block").hide(); $(".btn-addNewAddress").click(function(){$(".add-new-block").show(); }); $(".add-new-cancel转载 2013-08-15 16:00:59 · 1091 阅读 · 0 评论