摘要: sync默认的设置值为true,这种情况为异步方式,就是说当ajax发送请求后,在等待server端返回的这个过程中,前台会继续执行ajax块后面的脚本,直到server端返回正确的结果才会去执行success,也就是说这时候执行的是两个线程,ajax块发出请求后一个线程和ajax块后面的脚本(另一个线程);解决办法一:1.全局设置:$.ajaxSetup({ async : false }); 2.使用post或get方法;解决办法二:直接使用$.ajax$.ajax({ async : false; }); 阅读全文
posted @ 2013-05-10 09:32 white-poplar 阅读(421) 评论(0) 推荐(0) 编辑
摘要: <%'函数名:engotTopic'作 用:按单词截英文字符串'参 数:words ----原字符串' position ----截取长度、位置'返回值:截取后的字符串function engotTopic(ByVal words,ByVal position) dim flag,length if words="" then engotTopic="" exit function end ifwords=replace(replace(replace(replace(words,"&nbs 阅读全文
posted @ 2013-02-28 09:34 white-poplar 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 若向Access数据库中添加记录时,出现多添加一条空白记录时,可以先判断其中的字段不为空再插入数据,如:<%if request("name")<>"" then 添加记录 end if%> 阅读全文
posted @ 2013-02-27 14:53 white-poplar 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 此css是根据Eric_reset和YUI_reset修改合并而得:@charset "utf-8";/*--------------------------------- * Title:CSS_Reset * version:reset.css * Updated:2012.12.10 * Updated by: BY---------------------------------*/body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,b 阅读全文
posted @ 2013-02-27 14:37 white-poplar 阅读(183) 评论(0) 推荐(0) 编辑
摘要: /* 处理过长的字符串,截取并添加省略号 * 注:半角长度为1,全角长度为2 * str:字符串 * len:截取长度 * return: 截取后的字符串 */function cutbytestr(str, len) { var str_length = 0; var str_len = 0; str_cut = new String(); str_len = str.length; for (var i = 0; i < str_len; i++) { a = str.charAt(i); str_length++; ... 阅读全文
posted @ 2013-02-27 14:29 white-poplar 阅读(924) 评论(0) 推荐(0) 编辑
摘要: 我们在网页中插入flash时,通常使用下面的代码: <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="960" height="258"> <param name="movie" value=" 阅读全文
posted @ 2013-02-27 14:03 white-poplar 阅读(285) 评论(2) 推荐(0) 编辑