Sampson-Li
Sampson.Li学习经验总结博客 学历代表过去,能力代表现在.学习力代表未来!
摘要: 这个demo是当我们需要在列表页时,点开某一列,希望在该列的下面显示一行数据,或者一个文本.这里使用了asp.net自带的Repeater 控件.下面是要调用的js <script language="javascript"> var $ = function(i) { return document.getElementById(i) }; function moreshow(ml, mr) { if (mr==null || mr=="") { var e = $(ml); if (e.style.display != 'bloc 阅读全文
posted @ 2011-11-02 17:27 Sampson 阅读(583) 评论(0) 推荐(0) 编辑
摘要: 简单的常用栏目切换js.还不知道怎么上传文件呢.有点郁闷直接贴代码.htmlView Code <script type="text/javascript">function mouse(obj){var plist = obj.parentNode.getElementsByTagName("a");for(i=0;i<plist.length;i++){if(obj == plist[i]){plist[i].className = "hover_1";}else{plist[i].className = &qu 阅读全文
posted @ 2011-11-02 16:49 Sampson 阅读(2826) 评论(10) 推荐(3) 编辑
摘要: <div id="google_translate_element"></div><script>function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: 'en', includedLanguages: 'es,pt,fr,en', gaTrack: true, gaId: 'UA-20003276-11', layout: google.translate.T 阅读全文
posted @ 2011-11-02 15:53 Sampson 阅读(621) 评论(0) 推荐(0) 编辑
摘要: 先看一下效果图首先在controller中Create时.将数据存放与viewdata中[Authorize] public ActionResult Create() { IList<RuleElement> list = RuleElement.GetAll(); ViewData["ElementList"] = new SelectList(list, "ID", "RuleElementName"); ViewData["SelectElement"]=new List<SelectLi 阅读全文
posted @ 2011-11-02 11:53 Sampson 阅读(2578) 评论(0) 推荐(1) 编辑
摘要: 一个简单的内容分页.实现就是在内容插入的时候,在需要分页的地方,放入一个分页的表示符,然后分隔文章显示.public class Pager { //content是内容的str字符串,page是第几页 public static string ContentPage(string content,int page) { string[] array_content = content.Split(new string[] { "{$:page}" }, StringSplitOptions.None); int length = array_content.Length; 阅读全文
posted @ 2011-11-02 09:24 Sampson 阅读(709) 评论(2) 推荐(1) 编辑