JavaScript
xshf12345
这个作者很懒,什么都没留下…
展开
-
JS操作JSON总结
<br />JS操作JSON总结 body, p, th, td, li, ul, ol, h1, h2, h3, h4, h5, h6, pre { font-family: MS Shell Dlg; line-height: 1.4; } body, p, th, td, li, ul, ol, pre { font-size: 11px; } <br />JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式,采用完全独立于语言的文转载 2010-06-02 11:05:00 · 483 阅读 · 0 评论 -
js生成日期
<br />js生成日期 body, p, th, td, li, ul, ol, h1, h2, h3, h4, h5, h6, pre { font-family: MS Shell Dlg; line-height: 1.4; } body, p, th, td, li, ul, ol, pre { font-size: 11px; } var tempTime = new Date();<br /> var msg_time = tem原创 2010-06-02 11:06:00 · 882 阅读 · 0 评论 -
JAVASCRIPT 操作 cookie 完美实现
<br />function setCookie(name, value, expires, path, domain, secure) {document.cookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") +转载 2010-06-02 11:08:00 · 565 阅读 · 0 评论 -
JavaScript在IE和Firefox(火狐)的不兼容问题解决
今天测试代码时,发现不少IE可以运行的ajax,但在FF中报错。 IE和Firefox(火狐)在JavaScript方面的不兼容及统一方法总结如下: 1.兼容firefox的 outerHTML,FF中没有outerHtml的方法。 if (window.HTMLElement) { HTMLElement.prototype.__defineSetter__("outerHTML",function(sHTML) { var r=this.ownerDocument.cr原创 2010-10-09 15:03:00 · 487 阅读 · 0 评论 -
常用的js语句
<br />1.document.write(""); 输出语句<br /> 2.JS中的注释为//<br /> 3.传统的HTML文档顺序是:document->html->(head,body)<br /> 4.一个浏览器窗口中的DOM顺序是:window->(navigator,screen,history,location,document)<br /> 5.得到表单中元素的名称和值:document.getElementById("表单中元素的ID號").name(或value)<br /原创 2010-10-09 15:08:00 · 497 阅读 · 0 评论