代码改变世界

(转)Javascript如何正确使用getElementById,getElementsByName() and getElementsByTagName()

2012-09-03 23:29 by hongjiumu, 621 阅读, 0 推荐, 收藏,
摘要:Web标准下可以通过getElementById(),getElementsByTagName() and getElementsByName()访问Document中的任一个标签。(1)getElementById():getElementById()可以访问Document中的某一特定元素,顾名思义,就是通过ID来取得元素,所以只能访问设置了ID的元素。(2)getElementsByName():getElementsByName()是通过Name属性来获得元素。但注意区别:getElementById()中是element,而getElementsByName是elements。显而易 阅读全文

(Transfered)DOM最常用的方法和属性(Javascript DOM编程艺术,DOM Scripting)

2012-09-02 16:04 by hongjiumu, 434 阅读, 0 推荐, 收藏,
摘要:What this section covers:Creating nodesDuplicating nodesInserting nodesRemoving nodesReplacing nodesManipulating nodesFinding nodesNode propertiesTraversing the node treeThis section contains a list of some of the most useful methods and properties provided by the Document Object Model.They are arra 阅读全文

一个在线正则表达式验证

2012-08-30 20:30 by hongjiumu, 300 阅读, 0 推荐, 收藏,
摘要:http://www.rubular.com/ 阅读全文

把一个json字符串转换成对应的c#类型

2012-08-30 17:16 by hongjiumu, 1061 阅读, 0 推荐, 收藏,
摘要:放弃使用Newtonsoft,自己动手。using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection;using System.Text.RegularExpressions;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { string str = "[{Attribute... 阅读全文

Edit tbody

2012-08-29 10:04 by hongjiumu, 184 阅读, 0 推荐, 收藏,
摘要:You can't use innerHTML on parts of a table.innerHTML can only use to replace the entire table.stop using innerHTML,take some time and learn the DOM.<!--子窗口操作结果--> <div> <table class="innerTable"> <thead> <tr> <th> ... 阅读全文

js子窗口向父窗口传值

2012-08-28 19:14 by hongjiumu, 972 阅读, 0 推荐, 收藏,
摘要:用opener这是一个父窗口~<html><head><title></title><script language="javascript">function win(){window.open("login.html",null,"height=150,width=200");}</script></head><table id="t1"><tr><td id="dd">u 阅读全文

Placing a Method with Eval parameter into a DataList

2012-08-24 18:58 by hongjiumu, 199 阅读, 0 推荐, 收藏,
摘要:http://stackoverflow.com/questions/10542098/placing-a-method-with-eval-parameter-into-a-datalist 阅读全文

(转)C#数字转固定长度的字符串

2012-08-24 14:14 by hongjiumu, 32469 阅读, 1 推荐, 收藏,
摘要:关于数字右对齐和用0填充格式化字符串的方法在向文件或者报表输出数字的时候,固定字符串的长度向右对齐,用0填充其余空间的情况很常见。在这种情况下,使用String类(System名称空间)的Format方法就很方便。Format方法可以用参数设置字符串的格式以及指定相应的对象变量,本文提取一些经常用到的数字变换成字符串的情形进行介绍。使用Format方法把数字夹杂在字符串中输出在介绍数字的输出格式之前,首先回顾一下Format方法的基本用法。Format方法的常用情形,就像以下的代码这样把变量夹杂在字符串中处理然后输出。string name = "鈴木";int month 阅读全文

WDBuyNET.DMSFrame.DMSLinq内部方法

2012-08-22 19:00 by hongjiumu, 374 阅读, 0 推荐, 收藏,
摘要:/// <summary> /// 如果没有查找出相关编号将返回空值 /// 属性类型是string /// </summary> /// <typeparam name="T">参数实体</typeparam> /// <param name="prevCode">编号前缀符</param> /// <param name="property">参数的属性名称</param> /// <param name="length 阅读全文

Creating instance of type without default constructor in c#

2012-08-22 18:25 by hongjiumu, 242 阅读, 0 推荐, 收藏,
摘要:Use this override of the CreateInstance method:public static object CreateInstance( Type type, params object[] args)creates an instance of the specified type using the constructor that best matches the specified parameters.See:http://msdn.microsoft.com/en-us/library/wcxyzt4d.aspx很喜欢这样的做法!值得记牢! 阅读全文