摘要: @RenderSection相当于在母版页占一个位置解决页面差异化的问题如JS何CSS的调用 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>后台管理</title> 5 <link href="@Url.Content("~/Content/css.css")" rel="stylesheet" type="text/css" /> 6 <link href="@Url.Content 阅读全文
posted @ 2012-05-29 17:49 因为你 阅读(18332) 评论(1) 推荐(5) 编辑
摘要: Html页面1 <div class="nav">2 @Html.BuildNav(userInfo.UserID)3 <div class="clear">CSusing System;using System.Collections.Generic;using System.Globalization;using System.Linq;using System.Security.Principal;using System.Text;using System.Web.Mvc;namespace MFK.HTML{ publi 阅读全文
posted @ 2012-05-29 14:22 因为你 阅读(599) 评论(0) 推荐(0) 编辑
摘要: 一. .attr(attributeName)返回StringattributeName 为要获取的值的属性名值得注意的是这个.attr()方法只获取第一个匹配元素的属性值。要获取每个单独的元素的属性值, 我们需要依靠jQuery的 .each()或者.map()方法做一个循环。在jQuery 1.6中,当属性没有被设置时候,.attr()方法将返回undefined。另外,.attr()不应该用在普通的对象,数组,窗口(window)或文件(document)上。若要检索和更改DOM属性请使用.prop()方法。 the .attr() method returns undefined fo 阅读全文
posted @ 2012-05-08 11:17 因为你 阅读(2023) 评论(0) 推荐(0) 编辑
摘要: 例如: 问题:MVC开发中需要输出m_i 而无法输出解决,@string.Concat("m_",i.ToString()) @for (int i = 0; i < Controllist.Count; i++) { if (url.IndexOf(Controllist[i].FunCode) > 0) { <li id='@string.Concat("m_",i.ToString())' class="current" onmouseover='mover(@i,@Con... 阅读全文
posted @ 2012-05-03 17:36 因为你 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 设当前页完整地址是:http://www.jb51.net/aaa/bbb.aspx?id=5&name=kelli "http://"是协议名 "www.jb51.net"是域名 "aaa"是站点名 "bbb.aspx"是页面名(文件名) "id=5&name=kelli"是参数【1】获取 完整url (协议名+域名+站点名+文件名+参数) string url=Request.Url.ToString(); url= http://www.jb51.net/aaa/bbb.a 阅读全文
posted @ 2012-05-02 16:38 因为你 阅读(236) 评论(0) 推荐(0) 编辑