6月 14, 2011

AJAX

onclientclick="return false;" />

onclientclick="return false;"
false會導致無法呼叫.net的程式

6月 13, 2011

asp.net 光棒


Protected Sub GridView1_RowCreated(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowCreated

If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='red';")
If e.Row.RowState = DataControlRowState.Alternate Then '判定row的型態是替代資料行
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF';")
'滑鼠移開底色恢復
Else
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#EFF3FB';")
'滑鼠移開底色恢復
End If
End If
End Sub

6月 12, 2011

jquery

<head runat="server">
    <title></title>
    <script src="Scripts/jquery-1.6.1.min.js" type="text/javascript"></script>
    <script type = "text/javascript" >
        $(document).ready(function () {
            $("a").click(function () { alert("hello!"); return false; }); //對a標籤
            $("#hp").click(function () { alert("hello!"); return false; }); //對ID為HP
            $(".mp").click(function () { alert("hello!"); return false; }); //對class為mp 各自獨立
            $("*").addClass(); //表示所有物件
            //$("#bb1").click(function () { $("#Image1").addClass('css'); }); //套用CSS


            $("#box").hide();
            $("#bb1").click(function () { $("#box").toggle("slow"); });
            //屌光棒
            $("tr").hover(function () { $(this).addClass('color'); }, function () { $(this).removeClass('color'); });


            $("#bb1").click(function () { $("#tb1").attr({ disabled: "disabled" }); });


 


        });
    </script>
    <style type="text/css">
   
    .css{border:1px solid #ababab;}
    .color{background-color: red;}
        .style1
        {
            width: 100%;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
   
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <a href="#">dowmload</a>
    <a href="#" id="hp">dowmload2</a>
    <a href="#" class="mp">dowmload3</a><br>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Button ID="bb1" runat="server" Text="Button" /><br>
        </ContentTemplate>
   
    </asp:UpdatePanel>
    <asp:TextBox ID="tb1" runat="server"></asp:TextBox>
    <asp:Image ID="Image1" runat="server" ImageUrl="~/img/logo.png" />
    <div class="asd" id="box">
    123456789
    </div>


 



    </form>
            <table class="style1" id="bg">
                <tr>
                    <td>
                        1</td>
                </tr>
                <tr>
                    <td>
                        2</td>
                </tr>
                <tr>
                    <td>
                        3</td>
                </tr>
                <tr>
                    <td>
                        4</td>
                </tr>
                <tr>
                    <td>
                        5</td>
                </tr>
                <tr>
                    <td>
                        6</td>
                </tr>
            </table>
</body>
</html>

5月 22, 2011

六十花甲子纳音

六十甲子用途很广,人的出生年、月、日、时中天干地支排列,就是此查出。古人把六十甲子按金木水火土分为五种类型的命,每两年为一行,为一个年命纳音。金年生者,为金命,火年生者,为火命。如1984甲子年、1985年乙丑年生的人,都是“海中金”命,简称“金命”人。其他命依此类推,每六十年一轮,周而复始。具体纳音如下:

甲子乙丑海中金,丙寅丁卯炉中火;戊辰已巳大林木,
庚午辛未路旁土;壬申癸酉剑锋金。甲戌乙亥山头火,
丙子丁丑涧下水;戊寅已卯城头土,庚辰辛巳白蜡金;
壬午癸未杨柳木。甲申乙酉泉中水,丙戌丁亥屋上土;
戊子已丑霹雳火,庚寅辛卯松柏木;壬辰癸巳长流水。
甲午乙未沙中金,丙申丁酉山下火;戊戌已亥平地木,
庚子辛丑壁上土;壬寅癸卯金箔金。甲辰乙巳覆灯火,
丙午丁未天河水;戊申已酉大驿土,庚戌辛亥钗钏金;
壬子癸丑桑柘木。甲寅乙卯大溪水,丙辰丁巳沙中土;
戊午已未天上火,庚申辛酉石榴木;壬戌癸亥大海水。

3月 27, 2011

php.ini 解除上傳限制

一、修改php.ini文件。
找到php中的php.ini文件,用筆記本打開:

1、尋找post_max_size,指通過表單POST給PHP的所能接收的最大值,包括表單裏的所有值,預設為8M,看你自己需要進行修改。

2、尋找File Uploads,首先確認file_uploads = on ;是否允許通過HTTP上傳檔的開關,預設為ON「即是開啟」。 upload_tmp_dir ;設定上傳之HTTP檔案暫時存放目錄
尋找upload_max_filesize ;即允許上傳檔大小的最大值。預設為2M。