明天的明天 永远的永远 未知的一切 我与你一起承担 ??

是非成败转头空 青山依旧在 几度夕阳红 。。。
随笔 - 1277, 文章 - 0, 评论 - 214, 阅读 - 320万
  博客园  :: 首页  :: 管理
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

随笔分类 -  JavaScript

摘要:ajaxFileupload 多文件上传 修改前的代码: 要实现多个文件上传,就改成下面的样子: 初始化的代码: 实例调用: 阅读全文

posted @ 2017-05-10 11:16 且行且思 阅读(6122) 评论(0) 推荐(0) 编辑

摘要:$(".load_more").css('display','none'); 或$(that.more).find("strong").hide(); 需要注意的问题(offset) $(that.more).offset().top 值有可能为0其offset()都会变为0,但是实际上通过att... 阅读全文

posted @ 2015-12-28 23:03 且行且思 阅读(967) 评论(0) 推荐(0) 编辑

摘要:遇到过几次这种问题,现在总结一下。代码: google这段代码在主流的浏览器里面都没问题,但是在IE6下就会出现不能跳转的现象。经过一翻排查,发现绑定的事件都会执行,是由于DOM本身的冒泡事件所以会最后执行href属性内的javascript:void(0);导致的。a标签a标签本来就是用来进行页面跳转的标签,其运行机制是告诉浏览器URL地址并且跳转。当然,我们可以在href属中直接执行javascript。代码:Say HelloSay Hello这里由于javascript执行了alert函数,但是其返回的是null。所以a标签没有执行任何动作。javascript:void(0);voi 阅读全文

posted @ 2013-12-09 14:08 且行且思 阅读(766) 评论(0) 推荐(0) 编辑

摘要:1. 获得iframe的window对象存在跨域访问限制。chrome:iframeElement. contentWindow firefox: iframeElement.contentWindow ie6:iframeElement.contentWindow 文章Iframes, onload, and document.domain中说“he iframe element object has a property called contentDocument that contains the iframe’s document object, so you can use the 阅读全文

posted @ 2013-10-30 22:20 且行且思 阅读(595) 评论(0) 推荐(0) 编辑

摘要:首页 上一页 第页,共{pagecount}页 下一页 最后一页 刷新 //*********************************************** 以上为js生面的分页代码 ,并已做监听事件。>>>>>$("#pages").html("");temp = $("div[name='fixpages']");//pages_img fix//temp = $(".pages_img");//用jquery的clone方法来解决动态div的复制te 阅读全文

posted @ 2013-10-26 17:36 且行且思 阅读(5833) 评论(0) 推荐(0) 编辑

摘要:setTimeout 用于延时器,只执行一次.setInterval:用于多次执行.//******************************************项目中引用到jquery.timers-1.2.js定时器,并且MSClass做信息定期滚动,每3分钟执行一次,执行三次左右,滚动的次数越来越快,原因在于timers和MSClass都用了setInterval,都会再次添加一个setInterval,最后导致几个setInterval并发执行了,所以速度很快,需要在调用的时候clearInterval上次的setInterval ,或者引用MSClass作者的原方法,//定 阅读全文

posted @ 2013-10-12 17:42 且行且思 阅读(701) 评论(0) 推荐(0) 编辑

摘要:Jquery的$.ajax方法可以实现ajax调用,要设置url,post,参数等。如果要提交现有Form需要写很多代码,何不直接将Form的提交直接转移到ajax中呢。以前的处理方法如Form代码如下:<formid="Form1" action="action.aspx" method="post" >名称:<inputname="name" type="text" /><br/>密码:<inputname="password" 阅读全文

posted @ 2012-06-15 17:59 且行且思 阅读(1406) 评论(0) 推荐(0) 编辑

摘要:源码:http://files.cnblogs.com/Fooo/jquery.combogrid-1.5.0.rar效果:下载的源程序中示例为php, 个人结合json规范修改成.net示例,如JsonData.ashx :<%@ WebHandler Language="C#" Class="JsonData" %>using System;using System.Web;/* * 异步获取查询字符,并生成combogrid下拉表单数据。 * 必须返回json格式数据 -多属性及多数据行"; * 创建日期:Lt 2012-02 阅读全文

posted @ 2012-02-27 17:10 且行且思 阅读(1134) 评论(0) 推荐(0) 编辑

摘要:今天看一个新闻网站,看到它的分页用的是JS读取内容字符串(这里用的XML节点内容)后处理,分页按自定义字数分,而且可以点击显示全部(即不分页方式浏览)查看了它的源代码后提出了这个基本方法,感觉很好,粗略说一下前台调用方法及注意的地方:<div id="article"><!--正文正文内容显示区域(必须保留,后台js程序用到这个id)--></div><xml id="xmlArticle"><Article><Info><Content><![CDATA[< 阅读全文

posted @ 2012-02-27 12:16 且行且思 阅读(2387) 评论(0) 推荐(0) 编辑

摘要:$("form").attr("check"); $("form").prop("check"); 两种都可以,不过新版jquery推荐第二种,两个在其他方面都差不多,我发现的唯一不同就是在checkbox上的时候,需要用prop,不然IE浏览器会不兼容//=====================================================================================<html xmlns="http://www.w3.org/1999/xh 阅读全文

posted @ 2011-10-13 00:30 且行且思 阅读(116208) 评论(2) 推荐(4) 编辑

摘要:js闭包(转载)一、什么是闭包? “官方”的解释是:闭包是一个拥有许多变量和绑定了这些变量的环境的表达式(通常是一个函数),因而这些变量也是该表达式的一部分。 相信很少有人能直接看懂这句话,因为他描述的太学术。其实这句话通俗的来说就是:JavaScript中所有的function都是一个闭包。不过一般来说,嵌套的function所产生的闭包更为强大,也是大部分时候我们所谓的“闭包”。看下面这段代码: function a() { var i = 0; function b() { alert(++i); } return b; } var c = a(); c(); 这段代码有两个特... 阅读全文

posted @ 2011-10-11 11:45 且行且思 阅读(2377) 评论(0) 推荐(0) 编辑

摘要:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Text;using System.IO;public partial class _Default : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { } /// <summary... 阅读全文

posted @ 2011-09-26 21:56 且行且思 阅读(2370) 评论(0) 推荐(0) 编辑

摘要:利用JQuery的$.ajax()可以很方便的调用asp.net的后台方法。先来个简单的实例热热身吧。1、无参数的方法调用asp.net code:view plaincopy to clipboardprint?using System.Web.Script.Services; [WebMethod] public static string SayHello() { return "Hello Ajax!"; } using System.Web.Script.Services;[WebMethod]public static string SayHello(){ re 阅读全文

posted @ 2011-08-16 16:00 且行且思 阅读(1082) 评论(0) 推荐(1) 编辑

摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script><style t 阅读全文

posted @ 2011-06-15 10:15 且行且思 阅读(651) 评论(0) 推荐(0) 编辑

摘要:1、 内容里有两个ifame <iframe id="leftiframe"...</iframe> <iframe id="mainiframe..</iframe> leftiframe中jQuery改变mainiframe的src代码: $("#mainframe",parent.document.body).attr("src","http://www.radys.cn") 2、 如果内容里面有一个ID为mainiframe的ifame <iframe i 阅读全文

posted @ 2011-02-25 11:45 且行且思 阅读(1926) 评论(0) 推荐(0) 编辑

摘要:jQuery.each方法用于遍历一个数组或对象,并对当前遍历的元素进行处理,在jQuery使用的频率非常大,下面就这个函数做了详细讲解:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--/*!*jQuery源码分析-each函数*jQuery版本:1.4.2**----------------------------------------------------------*函数介绍**each函数通过jQuery.extend函数附加到jQ 阅读全文

posted @ 2011-01-11 14:51 且行且思 阅读(9109) 评论(1) 推荐(5) 编辑

摘要:timeCountDown.js 对象插件:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--/*byzhangxinxu2010-07-27*http://www.zhangxinxu.com/*倒计时的实现*/varfnTimeCountDown... 阅读全文

posted @ 2010-09-26 11:12 且行且思 阅读(911) 评论(0) 推荐(0) 编辑

摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-... 阅读全文

posted @ 2010-09-26 10:06 且行且思 阅读(786) 评论(0) 推荐(0) 编辑

摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-... 阅读全文

posted @ 2010-04-12 00:53 且行且思 阅读(3763) 评论(0) 推荐(0) 编辑

摘要:前期工作1.你必须安装firefox浏览器;参见:http://www.aptana.com/docs/index.php/Installing_the_JavaScript_debugger前提是安装 Firebug 插件 和aptanadebugger 插件,他们的下载地址如下:http://getfirebug.com/releases/firebug/1.2/firebug-1.2.0.x... 阅读全文

posted @ 2010-01-28 16:19 且行且思 阅读(4798) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示