03 2011 档案

获取输入的字符长度
摘要: //获取输入的字符长度function findInputLength(inputString){ var charCount = 0; for (var i = 0; i < inputString.length; i++) { if (inputString.charCodeAt(i) >= 0 && inputString.charCodeAt(i) <= 255) { charCount += 1; } else { charCount += 2; } } return charCount; }阅读全文

posted @ 2011-03-18 11:24 matchcolor 阅读(41) | 评论 (0) 编辑

jquery Ajax 实现加载数据前动画效果
摘要: $(document).ready(function(){ $.ajax({ type:"get", cache:false, url:"ajaxpage.aspx?t=getcity", dataType:"json", beforeSend:function(){ $("#vvv").append('<img src="http://images.cnblogs.com/loading.gif" />'); }, success:function(data){ $阅读全文

posted @ 2011-03-18 11:24 matchcolor 阅读(323) | 评论 (0) 编辑