16:41 - 17/12/2014

Code Đặt quảng cáo cố định góc phải màn hình cho Web, Blogspot

    Quảng cáo luôn là nguồn thu nhập chính của các Webmaster. Hiện nay, có rất nhiều nhà cung cấp quảng cáo chuyên nghiệp và hiện đại. Tiêu biểu đang HOT như nhà cung cấp quảng cáo Google Adsense. Website của bạn đang có nguồn view cao và ổn định, Bạn nên tính chuyện chọn 1 nhà cung cấp quảng cáo uy tín và hiệu quả nhất. Nhưng rồi bạn thiết nghĩ không biết đặt quảng cáo của mình ở vị trí nào là hơp lý và tốt nhất. Bài hướng dẫn hôm nay, ThaiAiTi.com giới thiệu cho bạn đọc thêm 1 dạng đặt quảng cáo cố định bên phải màn hình.


    Code Đặt quảng cáo cố định góc phải màn hình cho Web, Blogspot


    Cách thực hiện khá đơn giản. Bạn thực hiện như sau:

    - Bước 1: Chèn đoạn code sau trên </head>
    <script type="text/javascript">document.write('\u003c\u0073\u0063\u0072\u0069\u0070\u0074\u0020\u0074\u0079\u0070\u0065\u003d\u0027\u0074\u0065\u0078\u0074\u002f\u006a\u0061\u0076\u0061\u0073\u0063\u0072\u0069\u0070\u0074\u0027\u003e\u000a\u002f\u002f\u003c\u0021\u005b\u0043\u0044\u0041\u0054\u0041\u005b\u000a\u0066\u0075\u006e\u0063\u0074\u0069\u006f\u006e\u0020\u0068\u0069\u0064\u0065\u005f\u0071\u0063\u0072\u0069\u0067\u0068\u0074\u0028\u0029\u0020\u007b\u000a\u0020\u0020\u0020\u0020\u0076\u0061\u0072\u0020\u0063\u006f\u006e\u0074\u0065\u006e\u0074\u0020\u003d\u0020\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002e\u0067\u0065\u0074\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0042\u0079\u0049\u0064\u0028\u0027\u0071\u0063\u0072\u0069\u0067\u0068\u0074\u002d\u006d\u0061\u0069\u006e\u0074\u0068\u0061\u0069\u0061\u0069\u0061\u0069\u0074\u0069\u0027\u0029\u003b\u000a\u0020\u0020\u0020\u0020\u0076\u0061\u0072\u0020\u0068\u0069\u0064\u0065\u0020\u003d\u0020\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002e\u0067\u0065\u0074\u0045\u006c\u0065\u006d\u0065\u006e\u0074\u0042\u0079\u0049\u0064\u0028\u0027\u0068\u0069\u0064\u0065\u005f\u0071\u0063\u0072\u0069\u0067\u0068\u0074\u0027\u0029\u003b\u000a\u0020\u0020\u0020\u0020\u0069\u0066\u0020\u0028\u0063\u006f\u006e\u0074\u0065\u006e\u0074\u002e\u0073\u0074\u0079\u006c\u0065\u002e\u0064\u0069\u0073\u0070\u006c\u0061\u0079\u0020\u003d\u003d\u0020\u0022\u006e\u006f\u006e\u0065\u0022\u0029\u000a\u0020\u0020\u0020\u0020\u007b\u0063\u006f\u006e\u0074\u0065\u006e\u0074\u002e\u0073\u0074\u0079\u006c\u0065\u002e\u0064\u0069\u0073\u0070\u006c\u0061\u0079\u0020\u003d\u0020\u0022\u0062\u006c\u006f\u0063\u006b\u0022\u003b\u0020\u0068\u0069\u0064\u0065\u002e\u0069\u006e\u006e\u0065\u0072\u0048\u0054\u004d\u004c\u0020\u003d\u0020\u0027\u003c\u0061\u0020\u0068\u0072\u0065\u0066\u003d\u0022\u006a\u0061\u0076\u0061\u0073\u0063\u0072\u0069\u0070\u0074\u003a\u0068\u0069\u0064\u0065\u005f\u0071\u0063\u0072\u0069\u0067\u0068\u0074\u0028\u0029\u0022\u003e\u0054\u1eaf\u0074\u0020\u0071\u0075\u1ea3\u006e\u0067\u0020\u0063\u00e1\u006f\u0020\u005b\u0058\u005d\u003c\u002f\u0061\u003e\u0027\u003b\u0020\u007d\u000a\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0065\u006c\u0073\u0065\u0020\u007b\u0020\u0063\u006f\u006e\u0074\u0065\u006e\u0074\u002e\u0073\u0074\u0079\u006c\u0065\u002e\u0064\u0069\u0073\u0070\u006c\u0061\u0079\u0020\u003d\u0020\u0022\u006e\u006f\u006e\u0065\u0022\u003b\u0020\u0068\u0069\u0064\u0065\u002e\u0069\u006e\u006e\u0065\u0072\u0048\u0054\u004d\u004c\u0020\u003d\u0020\u0027\u003c\u0061\u0020\u0068\u0072\u0065\u0066\u003d\u0022\u006a\u0061\u0076\u0061\u0073\u0063\u0072\u0069\u0070\u0074\u003a\u0068\u0069\u0064\u0065\u005f\u0071\u0063\u0072\u0069\u0067\u0068\u0074\u0028\u0029\u0022\u003e\u0058\u0065\u006d\u0020\u0071\u0075\u1ea3\u006e\u0067\u0020\u0063\u00e1\u006f\u002e\u002e\u002e\u003c\u002f\u0061\u003e\u0027\u003b\u000a\u0020\u0020\u0020\u0020\u007d\u000a\u0020\u0020\u0020\u0020\u007d\u000a\u002f\u002f\u005d\u005d\u003e\u000a\u003c\u002f\u0073\u0063\u0072\u0069\u0070\u0074\u003e\u000a\u003c\u0073\u0063\u0072\u0069\u0070\u0074\u0020\u0074\u0079\u0070\u0065\u003d\u0027\u0074\u0065\u0078\u0074\u002f\u006a\u0061\u0076\u0061\u0073\u0063\u0072\u0069\u0070\u0074\u0027\u003e\u000a\u0020\u0020\u0020\u0020\u002f\u002f\u003c\u0021\u005b\u0043\u0044\u0041\u0054\u0041\u005b\u000a\u0020\u0020\u0020\u0020\u0024\u0028\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u0029\u002e\u0072\u0065\u0061\u0064\u0079\u0028\u0066\u0075\u006e\u0063\u0074\u0069\u006f\u006e\u0020\u0028\u0029\u0020\u007b\u000a\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0024\u0028\u0027\u0023\u0071\u0063\u0072\u0069\u0067\u0068\u0074\u002d\u006d\u0061\u0069\u006e\u0074\u0068\u0061\u0069\u0061\u0069\u0061\u0069\u0074\u0069\u0027\u0029\u002e\u0068\u0074\u006d\u006c\u0028\u0027\u003c\u0061\u0020\u0068\u0072\u0065\u0066\u003d\u0022\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0077\u0077\u0077\u002e\u0074\u0068\u0061\u0069\u0061\u0069\u0074\u0069\u002e\u0063\u006f\u006d\u002f\u0022\u003e\u003c\u002f\u0061\u003e\u0027\u0029\u003b\u000a\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0073\u0065\u0074\u0049\u006e\u0074\u0065\u0072\u0076\u0061\u006c\u0028\u0066\u0075\u006e\u0063\u0074\u0069\u006f\u006e\u0020\u0028\u0029\u0020\u007b\u000a\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0069\u0066\u0020\u0028\u0021\u0024\u0028\u0027\u0023\u0071\u0063\u0072\u0069\u0067\u0068\u0074\u002d\u006d\u0061\u0069\u006e\u0074\u0068\u0061\u0069\u0061\u0069\u0061\u0069\u0074\u0069\u003a\u0076\u0069\u0073\u0069\u0062\u006c\u0065\u0027\u0029\u002e\u006c\u0065\u006e\u0067\u0074\u0068\u0029\u0020\u0077\u0069\u006e\u0064\u006f\u0077\u002e\u006c\u006f\u0063\u0061\u0074\u0069\u006f\u006e\u002e\u0068\u0072\u0065\u0066\u0020\u003d\u0020\u0027\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0077\u0077\u0077\u002e\u0074\u0068\u0061\u0069\u0061\u0069\u0074\u0069\u002e\u0063\u006f\u006d\u0027\u000a\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u007d\u002c\u0020\u0031\u0030\u0030\u0030\u0029\u000a\u0020\u0020\u0020\u0020\u007d\u0029\u0020\u000a\u002f\u002f\u005d\u005d\u003e\u000a\u003c\u002f\u0073\u0063\u0072\u0069\u0070\u0074\u003e')</script>
    - Bước 2: Chèn đoạn code sau dưới <body> hoặc trên </body> 
    <div class="qcright-thaiaiti" style="right: 0px" >
    <style>
    .qcright-thaiaiti { position: fixed; bottom: 0px; z-index: 9000}
    * html .qcright-thaiaiti {position:absolute;bottom:auto;top:expression(eval (document.documentElement.scrollTop+document.docum entElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0))) ;}
    #qcright-mainthaiaiaiti {border: 1px solid #01AEF0;}
    #hide_qcright {text-align:right; font-size: 11px;}
    #hide_qcright a {background: #01AEF0; padding: 2px 4px; color: #FFF;}
    </style>
    <div id="hide_qcright">
    <a href="javascript:hide_qcright()">Tắt Quảng Cáo [X]</a></div>
    <div id="qcright-mainthaiaiaiti">
    nội dung quảng cáo của bạn </div>
    </div>
    * Chúc bạn thành công! Mọi thắc mắc vui lòng để lại bên dưới phần comment. Hy vọng bài hướng dẫn trên sẽ giúp cho các bạn Thiết kế Blogspot  chuyên nghiệp thêm kỹ năng. Hoặc yêu cầu thủ thuật tại đây để được ThaiAiTi chia sẻ 

Bình luận & Góp ý

0 nhận xét:

Đăng nhận xét