wucf2004的博客

asp.net和ajax
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2006年11月28日

摘要: 关于提交表单的问题:点击后无论是否符合要求都会提交表单,如何需要控制只有符合要求的才可以提交,需要如下:function check(){ var name=document.getElementById("txtUserName").value; if(name==""){ return false; }else{ document.form1.submit();}} 注意其中的form1为fo... 阅读全文

posted @ 2006-11-28 20:34 wucf2004 阅读(182) 评论(0) 推荐(0) 编辑

摘要: 定时器:用以指定在一段特定的时间后执行某段程序。 JS中定时执行,setTimeout和setInterval的区别,以及l解除方法 setTimeout(Expression,DelayTime),在DelayTime过后,将执行一次Expression,setTimeout 运用在延迟一段时间,再进行某项操作。setTimeout("function",time) 设置一个超时对象 setIn... 阅读全文

posted @ 2006-11-28 20:18 wucf2004 阅读(457) 评论(0) 推荐(0) 编辑

摘要: 一般情况下,将数据放到一个节点的属性上,这样最容易操作, 例如xml格式为: 如果得到photo节点后,可以如下操作: node.getAttribute(''attr1''); 这样可以得到属性的值。 第二种情况,如果是放入的节点之间,比如: 这是我的照片 这样可以用node.firstChild.data来获取数据,其中photo之间的内容被看作一个文本节点,因此必须用firstChild首... 阅读全文

posted @ 2006-11-28 19:54 wucf2004 阅读(601) 评论(0) 推荐(0) 编辑

摘要: 1 阅读全文

posted @ 2006-11-28 16:46 wucf2004 阅读(7751) 评论(15) 推荐(0) 编辑

摘要: 1 阅读全文

posted @ 2006-11-28 16:43 wucf2004 阅读(3647) 评论(1) 推荐(0) 编辑

摘要: 1 阅读全文

posted @ 2006-11-28 12:59 wucf2004 阅读(1902) 评论(3) 推荐(0) 编辑

摘要: var source=new ActiveXObject("Msxml2.DOMDocument"); source.async=false; source.load("xml.xml") nodes = source.documentElement.childNodes;var ItemN = source.getElementsByTagName("pic");var j = It... 阅读全文

posted @ 2006-11-28 12:57 wucf2004 阅读(1976) 评论(1) 推荐(0) 编辑