摘要: JQuery的extend扩展方法: Jquery的扩展方法extend是我们在写插件的过程中常用的方法,该方法有一些重载原型,在此,我们一起去了解了解。一、Jquery的扩展方法原型是: extend(dest,src1,src2,src3...); 它的含义是将src1,src2,src3...合并到dest中,返回值为合并后的dest,由此可以看出该方法合并后,是修改了dest的结构的。如果想要得到合并的结果却又不想修改dest的结构,可以如下使用: var newSrc=$.extend({},src1,src2,src3...)//也就是将"{}"作为dest参数 阅读全文
posted @ 2011-05-01 14:25 天平盛世 阅读(251) 评论(0) 推荐(0) 编辑
摘要: New Document <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME= 阅读全文
posted @ 2011-04-30 15:20 天平盛世 阅读(449) 评论(0) 推荐(0) 编辑
摘要: <html><body><p>请把鼠标移动到单词上,这样会看到鼠标指针的变化:</p> <span style="cursor: auto">Auto</span><br /><span style="cursor: crosshair">Crosshair</span><br /><span style="cursor: default">Default</span><br /> 阅读全文
posted @ 2011-04-30 15:15 天平盛世 阅读(437) 评论(0) 推荐(1) 编辑
摘要: 从路径选择系统构建输出的URL在本文的前面,我说过ASP.NET MVC路径选择系统负责两件事情:把进来的URL映射到处理的Controllers/Actions上帮着构建可以在以后用来回调Controllers/Actions的输出到客户端的URL(例如,表单提交, < a href="">链接, 和 AJAX 调用等等)URL路径选择系统有不少辅助方法和类,方便你在运行时动态查看和构建URL(你也可以直接对RouteTable的Route集合进行操作来查看URL)。Html.ActionLink在本博客系列的第一部分,我简单地讨论了Html.ActionLi 阅读全文
posted @ 2011-04-29 11:52 天平盛世 阅读(498) 评论(0) 推荐(0) 编辑
摘要: 设置或获取对象指定的文件名或路径。<script>alert(window.location.pathname)</script>设置或获取整个 URL 为字符串。<script>alert(window.location.href);</script>设置或获取与 URL 关联的端口号码。<script>alert(window.location.port)</script>设置或获取 URL 的协议部分。<script>alert(window.location.protocol)</script&g 阅读全文
posted @ 2011-04-29 10:39 天平盛世 阅读(503) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;using System.Web.Routing;namespace MyMvc{ // 注意: 有关启用 IIS6 或 IIS7 经典模式的说明, // 请访问 http://go.microsoft.com/?LinkId=9394801 public class MvcApplication : System.Web.HttpApplication { public static voi 阅读全文
posted @ 2011-04-28 18:30 天平盛世 阅读(185) 评论(0) 推荐(0) 编辑
摘要: ASP.NET中的框架验证方法1:1.模型定义public class User{ [Required(ErrorMessage="用户名不能为空!!")] [StringLength(6,ErrorMessage="用户名不能多于6个字符!!")] [DisplayName("用户名:")] public string U_Password { get; set; } [Required(ErrorMessage = "密码不能为空!!")] [StringLength(6, ErrorMessage = &qu 阅读全文
posted @ 2011-04-28 14:54 天平盛世 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 1 在web.config中添加配置信息<configuration><connectionStrings><add name="conStr" connectionString="server=localhost;database=master;uid=sa;pwd="/></connectionStrings></configuration>*******************************/// dbcon 数据库的连接类,可调用静态函数创建/// </summary&g 阅读全文
posted @ 2011-04-26 17:50 天平盛世 阅读(942) 评论(0) 推荐(0) 编辑
摘要: Web.config: <appSettings> <add key= "ConnectionString " value= "data source=****;initial catalog=****;persist security info=False;user id=****;pwd=**** " /> </appSettings> Get it: string strConn = ConfigurationSettings.AppSettings[ "ConnectionString "] 阅读全文
posted @ 2011-04-26 17:48 天平盛世 阅读(439) 评论(0) 推荐(0) 编辑
摘要: .net方法namespace Controllers{ public class DocumentController { public ActionResult Index() { return View(); } public string GetDocumentUrl() { return Comment.documentUrl; } }}这中方式取不到值,原来我使用dataType:'json' 而。net中的方法返回值是string类型的。改成dataType: 'Text'就好了,或者直接去掉dataType:'json' 它会自动 阅读全文
posted @ 2011-04-26 16:06 天平盛世 阅读(2506) 评论(1) 推荐(0) 编辑