UWInfo Blog
發表新文章
[Join] | [忘記密碼] | [Login]
搜尋

搜尋意見
文章分類-#Author#
[所有文章分類]
所有文章分類
  • ASP.NET (48)
  • ASP.NET2.0 (15)
  • ASP.NET4.0 (34)
  • JavaScript (49)
  • jQuery (26)
  • FireFox (4)
  • UW系統設定 (3)
  • SQL (39)
  • SQL 2008 (25)
  • mirror (4)
  • SVN (4)
  • IE (9)
  • IIS (20)
  • IIS6 (1)
  • 閒聊 (7)
  • W3C (6)
  • 作業系統 (9)
  • C# (24)
  • CSS (12)
  • FileServer (1)
  • HTML 5 (11)
  • CKEditor (3)
  • UW.dll (13)
  • Visual Studio (16)
  • Browser (8)
  • SEO (1)
  • Google Apps (3)
  • 網站輔助系統 (4)
  • DNS (5)
  • SMTP (4)
  • 網管 (11)
  • 社群API (3)
  • SSL (4)
  • App_Inventor (1)
  • URLRewrite (2)
  • 開發工具 (6)
  • JSON (1)
  • Excel2007 (1)
  • 試題 (3)
  • LINQ (1)
  • bootstrap (0)
  • Vue (3)
  • IIS7 (3)
  • foodpanda (2)
  • 編碼 (2)
  • 資安 (3)
  • Sourcetree (1)
  • MAUI (1)
  • CMD (1)
  • my sql (1)
最新回應
  • Newtonsoft.Json.JsonConvert.DeserializeObject 失敗的情況
    test...more
  • dotnet ef dbcontext scaffold
    ...more
  • [ASP.NET] 利用 aspnet_regiis 加密 web.config
    ...more
  • IIS ARR (reverse proxy) 服務安裝
    ...more
  • [錯誤訊息] 請加入 ScriptResourceMapping 命名的 jquery (區分大小寫)
    ...more
  • 用 Javascript 跨網頁讀取 cookie (Cookie cross page, path of cookie)
    ...more
  • 線上客服 - MSN
    本人信箱被盜用以致資料外洩,是否可以請貴平台予以協助刪除該信箱之使用謝謝囉...more
  • 插入文字到游標或選取處
    aaaaa...more
  • IIS 配合 AD (Active Directory) 認証, 使用 .Net 6.0
    太感謝你了~~~你救了我被windows 認證卡了好幾天QQ...more
  • PostgreSQL 的 monitor trigger
    FOR EACH ROW 可能要改為 FOR EACH STATEMENT ...more
標籤
  • ARR
  • 無法修改
  • innerhtml
  • 檔案
  • GRANT
  • for
  • monitor
  • web
  • postgres
  • max
  • 壓縮
  • null
  • -9692
  • .net
  • 1595
  • VS
  • 1833
  • 檔案
  • Find
  • sp_scanL1B
  • 20
  • ses,
  • -5389
  • drag
  • if ORDER B
  • attr,
  • 許功蓋
  • -5083
  • 234
  • 312
  • remote
  • 1569
  • 490
  • -8926
  • mssql
  • end
  • export
  • debug
  • [u2]
  • iis7 的設定匯
  • Nanoha
  • visual stu
  • !211211212
  • post
  • TPBase
  • CS
  • -9829 UNIO
  • db
  • @@tbkLE
  • Kil3rDz98H
頁數 32 / 53 上一頁 下一頁
搜尋 [u2] 結果:
防止 event 往上傳的終極方法
作global結帳時發生IE8不能選信用卡到期日,
因為 IE8 只吃 evt.cancelBubble = true 才不會把click事件往上層傳
所以以下是終極不會有問題的寫法

                if (evt.stopPropagation) { evt.stopPropagation() }
                if (evt.preventDefault) { evt.preventDefault() }
                try { evt.cancelBubble = true } catch (e) { }
                try { evt.returnValue = false } catch (e) { }


evt就是傳進來的event

(補充一下) 這個適合用 window.addEventListener 方式綁事件才需使用,如果用jQuery綁事件直接return false;就有一樣的效果


範例:

       // 經由bike提示,發現這範例不好 jQuery 可以直接 return false;
       $("#gc-exp-month-select a").click(function (evt) {
            $("#gc-exp-month").val($(this).text());
            $("#span-gc-exp-month").text($(this).text());
            $(this).parent().hide();
            if (evt.stopPropagation) { evt.stopPropagation() }
            if (evt.preventDefault) { evt.preventDefault() }
            try { evt.cancelBubble = true } catch (e) { }
            try { evt.returnValue = false } catch (e) { }
           // 在 jQuery 裡上面四行 可以用一行 return false; 就可
        });

 
More...
darren, 2014/7/17 下午 04:29:34
form 的 reset 功能對 hidden field 無作用
一般正常來說 如果要網頁的表單(Form) 做資料清除的動作
只要下 reset() 指令就可
document.getElementById("form1").reset();

但是對於 hidden field
<input type='hidden' name='txtId' value='xxx' />

這個方法是沒有作用的 資料還是在

兩個方法解決:
1. reset 之後再各自去清掉 hidden field 的 value (有點笨)
2. 不要用 hidden field 改用 display:none 的 DIV 去包要隱藏的 field
 
More...
darren, 2014/7/10 上午 10:23:38
youtube隨著螢幕大小自動調整寬高的方法
一般在崁入youtube影片時,影片的寬高是固定的

隨著螢幕大小自動調整寬高的方式:


CSS:
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
}
 
.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


HTML:
<div class="video-container">
    <iframe src="http://www.youtube.com/embed/dFVxGRekRSg" frameborder="0" width="560" height="315"></iframe>
</div>
More...
nelson, 2014/7/8 下午 03:46:05
css3 calc() 功能介紹

calc()是CSS3的一個計算長度單位的新功能,能使用數學四則運算方式。

1. 使用“+”“-”“*”“/”四則運算;

2. 可以使用百分比、px、em、rem等單位;

3. 可以混合使用各種單位進行計算。

例:
.thing {
  width: 90%; /* fallback if needed */
  width: calc(100% - 10px);
  width: calc((100% - 12px) / 2);
  width: calc(100%/3 - 2*1em - 2*1px);
}

4. 使用時,"+" & "-" 兩邊需加空格(一定要加), "*" & "/"兩邊是不用加空格(要加也是可以)

5. 瀏覽器的支援:IE9+ , Firefox4.0+ , Chrome , Safari , iOS Safari6.0+ , Android Browser 4.4+
   寫法: width: -moz-calc((100% - 12px) / 2);
              width: -webkit-calc((100% - 12px) / 2);
              width: calc((100% - 12px) / 2);
 
More...
nelson, 2014/7/8 上午 10:23:38
背景圖大小在手機上的限制
在PC版網站上,由於記憶體很大,background-image的圖,沒有甚麼大小限制,但在手機網站上,由於各家手機記憶體不一,
以iPhone 3GS為例,記憶體只有256mb,所以apple有限制背景圖的大小,以下是原文出處連結
https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariWebContent/CreatingContentforSafarioniPhone/CreatingContentforSafarioniPhone.html

大致上來說,iPhone記憶體若是低於256mb 圖片最大不能超過3百萬畫素(長x寬的總像素),但實際上測試iPhone 3GS在ios6系統上,若是超過2百萬畫素,就會無法正常顯示,這是iPhone的bug。
More...
nelson, 2014/7/7 下午 03:35:27
縮小背景圖片方法
 .mobile-share_fb{ display:block; background:url("http://www.shopunt.com/css/mobile/images/mobile-s9398562778.png") no-repeat; background-position: 0 -1648px; height: 80px; width: 80px;} 

 .shrink-attr{ background-size: 152px 2104px; width: 40px; height: 40px; background-position: 0 -824px;} 

 .fb-test{ display:block; background:url("http://www.shopunt.com/images/logo_welcome.jpg") no-repeat; background-size:50% 50%; width: 105px; height: 105px;} 


 
 
 
 
More...
nelson, 2014/7/7 上午 11:58:02
在 IE9 被 console.log 卡住
IE8 和 IE9 預設沒有 console 物件,若是在 javascript 中有加入 console.log 時,會卡住,解決辨法是做個假的出來。如下:


       //避免 console.log 發生錯誤.
        if (typeof console == "undefined") var console = { log: function () { } };
        else if (typeof console.log == "undefined") console.log = function () { };
More...
Bike, 2014/6/26 下午 07:54:10
左邊 Menu 當scroll時固定位置的方法 js
這個活動頁左邊 menu 要固定位置 但是不能跑出框框外面
http://www.shopunt.com/tch/event/2014-naked-truth-cc-cream/

所以需要處理scroll物件


<div id="menuContainer">
  <div id="menu">
    <ul>
      <li>menu1</li>
      <li>menu2</li>
    </ul>
  </div>
  <div> ...長內容.... </div>
</div>

js
        var __ContainerHeight = 5000;
        var __ContainerTop = 160;
        var __MenuHeight = 550;
        var __FixedTop = 20;

        $(window).load(function () {

            __ContainerHeight = $("#menuContainer").height();
            __ContainerTop = $("#menuContainer").offset().top;
            __MenuHeight = $("#menu").height();

            $("#menu").css({ "top": __FixedTop + "px", "position": "absolute" });
            $(window).scroll(function () {
                var scrolls = $(this).scrollTop();
                //console.log(scrolls);
                if (scrolls < __ContainerTop) {
                    $("#menu").css({ "top": __FixedTop + "px", "position": "absolute" });
                }
                else if ((scrolls + __MenuHeight + __FixedTop) > (__ContainerHeight + __ContainerTop)) {
                    $("#menu").css({ "top": (__ContainerHeight - __MenuHeight) + "px", "position": "absolute" });
                }
                else {
                    $("#menu").css({ "top": __FixedTop + "px", "position": "fixed" });
                }
            });

        });

 
More...
darren, 2014/6/20 下午 02:03:01
UNT - UW.TBase 增加 strBodyTop 變數
由於偶爾會有需要在 <body> 最上方塞入一些 html
例如塞入一個要置頂的 div 區塊
目前這個區塊只有 {DebugMessage}

所以在 master.html 增加一個新的項目 叫做 <!--BodyTop--> 
<body>
    <!--BodyTop-->
    {DebugMessage}
    <a id="anchorGoTop" href="#gotop" class="gotop" style="display: none;"><span><em></em></span></a>

UW.TBase 增加一個 Public 變數  strBodyTop

如此一般網頁使用時 就可以置入置頂的內容 注意:是塞入html
使用上 於 PreRender 時
        '購物button區塊置於 <body> 正下方
        Me.strBodyTop = Me.otContent.SubTemplate("BuyButtonArea").Result
就可以了
 
More...
darren, 2014/6/20 上午 10:57:30
日租王
這是一篇加密文章,需輸入密碼才可閱讀
More...
Reiko, 2014/6/19 下午 04:37:52
|< …23242526272829303132… >|
頁數 32 / 53 上一頁 下一頁
~ Uwinfo ~