2012.9笔记

1.window.parent

2.autocomplete="off"

3.function DX(n) { //金额大写转换函数
            if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n))
                return "数据非法";
            var unit = "千百拾亿千百拾万千百拾元角分", str = "";
            n += "00";
            var p = n.indexOf('.');
            if (p >= 0)
                n = n.substring(0, p) + n.substr(p + 1, 2);
            unit = unit.substr(unit.length - n.length);
            for (var i = 0; i < n.length; i++)
                str += '零壹贰叁肆伍陆柒捌玖'.charAt(n.charAt(i)) + unit.charAt(i);
            return str.replace(/零(千|百|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
        }

4.iframe去掉滚动条 frameborder=no


5.母版页的使用:
<asp:Literal ID="title1" runat="server"></asp:Literal>

6.line_height
垂直居中

7.设置单元格属性:table td{}

8.onfocus ipad使用问题

9.asp.net控件可以直接写style

10.<a  href="javascript:window.external.AddFavorite('http://你的网址','名称')" >添加收藏</a>

11.ul作导航加个margin-top
   padding:0;

12.linq学习

13.onclick="document.location.reload();"

14.Distinct()只显示一次
   Take(10)取前十 top10

15.sql: ISNULL ( check_expression , replacement_value )

16.获取天数间隔
System.Data.Linq.SqlClient.SqlMethods.DateDiffDay(v.Measure_Time,DateTime.Now)<0


17.System.Data.Linq.SqlClient.SqlMethods

18.runat="server" 控件id改变

19.ajax获取数据 提交失去数据

20.FirstOrDefault()

21.table在div内,无法设置margin-top ie8
   解决方案:position:absolute;或者:float:left;

22.ajax对比

23.InsertOnSubmit() SubmitChanges

var query = from v in m_M2SharpDU.Inf_SaleOrder
                      join c in m_M2SharpDU.Inf_Customer on v.Original_CustomerCode equals c.CustomerCode

                      where v.Enabled == true
                      orderby v.subDate
                      select new

24. AutoPostBack="true"

25.web用户自定义控件js的id重复问题

26.function deleteDiv()
 {
    var my = document.getElementById("divCell");
    if (my != null)
        my.parentNode.removeChild(my);
 }

27. objSelect.options[i].selected = true;

原文地址:https://www.cnblogs.com/wuchao/p/2671570.html