原创 隱藏 google 地圖 Logo 隱藏 百度 地圖 Logo
Google 地圖var isFirstLoad=true; //地圖瓦片加載完成之後的回調 google.maps.event.addListener(map, 'tilesloaded', function () { if (isFir
原创 js獲取URL地址的參數 多個可以循環
function GetRequest() { var url = location.search; //獲取url中"?"符後的字串 var theRequest = new Object();
原创 Jquery中parentsUntil函數調用最容易犯的三個錯誤
Jquery的parentsUntil()方法用於查找Jquery對象的祖先,使用的時候有三個問題一定要注意:1) parentsUntil返回的是一個數組,而不是單個對象。關於這個,注意’parents’是複數就行了,表示它會返回一系列的
原创 javascript處理HTML的Encode(轉碼)和Decode(解碼)總結
HTML的Encode(轉碼)和解碼(Decode)在平時的開發中也是經常要處理的,在這裏總結了使用javascript處理HTML的Encode(轉碼)和解碼(Decode)的常用方式一、用瀏覽器內部轉換器實現轉換1.1.用瀏覽器內部轉換
原创 移動端頁面寬度自適應
<!-- js --> <script type="text/javascript"> if(/Android (\d+\.\d+)/.test(navigator.userAgent)){ var ve
原创 我的友情鏈接
51CTO博客開發
原创 JS 操作Google Chrome瀏覽器的cookie
Google Chrome只支持在線網站的cookie的讀寫操作,對本地html的cookie操作是禁止的。所以下面的代碼如果你寫在一個本地的html文件中,將彈出的對話框內容爲空。document.cookie = "Test=cooo"
原创 jQuery實現CheckBox全選、全不選
<script src="jquery-1.6.2.min.js"></script> <input type="checkbox" id="ckAll" />check all<br /> <input type="checkbox" n
原创 css實現強制不換行/自動換行/強制換行
強制不換行 div{ white-space:nowrap; } 自動換行 div{ word-wrap: break-word; word-break: normal; } 強制英文單詞斷行 div{ word-break:break-a
原创 JavaScript應用:Iframe自適應其加載的內容高度
main.htm:<html> <head> <meta http-equiv='Content-Type' content='text/html; charset=gb2312' /> <meta
原创 FlexSlider
http://www.woothemes.com/flexslider/Get started with FlexSlider in 3 easy steps!Step 1 – Link filesAdd these items to t
原创 jquery實現可拖拽的浮動框
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>jQuery 模塊拖動,拖動層效果</title> <s
原创 js判斷移動終端安卓,蘋果,winphone
<script language="javascript"> window.onload = function () { var u = navigator.userAgent; if (u.inde
原创 placeholder在某些瀏覽器下不垂直居中問題
將input的line-height設置爲normal即可,讓瀏覽器自己去判斷
原创 JS判斷移動端訪問設備並解析對應CSS
JS判斷不同web訪問環境,主要針對移動設備,提供相對應的解析方案(判斷設備代碼直接copy騰訊網的)// 判斷是否爲移動端運行環境 // wukong.name 20130716 if(/AppleWebKit.*Mobile/i.tes