會員注冊關閉
> function $(id) js與jquery發生沖突的解決技巧 | 未知 | 2019-10-07 | 686 |
當網頁中JS、Jquery的代碼用多個特效時會出現沖突,以下是解決思路和一點技巧,網絡原創參考https://www.iteye.com/blog/wangkunafocusjava-1762757, function $(id){ return document.getElementById(id); } var $ = function (id) { return string == typeof id ? document.getElementById(id) : id; }; $(id)是js document.getElementById(id)的簡寫,定義了這個方法 以后調用的時候 |
> html meta標簽‘http-equiv’與‘name’屬性的詳解用法 | 未知 | 2019-08-04 | 729 |
meta是html語言head區的一個輔助性標簽。用好meta標簽,會給你帶來意想不到的效果: a、幫助主頁被各大搜索引擎登錄; b、定義頁面的使用語言 ; c、自動刷新并指向新的頁面; d、實現網頁轉換時的動畫效果 ; e、控制頁面緩沖 ; f、控制網頁顯示的窗口等功能 meta標簽的組成 : meta標簽共有兩個屬性,它們分別是http-equiv屬性和name屬性,不同的屬性又有不同的參數值,這些不同的參數 |
> meta標簽的各種使用技巧 | 未知 | 2019-08-04 | 762 |
一、http-equiv 1.Content-Type(內容類型) 告訴瀏覽器當前訪問的資源類型 并聲明編碼 meta http-equiv = Content-Type content = text/html; charset=gb2312 / 2.refresh(重定向) 重定向(以下示例5秒后會跳轉到: http://baidu.com ) meta http-equiv= refresh content= 5;url= http: //baidu.com / 3.Set-Cookie(cookie設定) 網頁過期則cookie將會被刪除(必須是GMT的時間格式) |
> meta標簽使用中文注釋詳解 | 未知 | 2019-08-04 | 701 |
!--meta標簽設置-- !--字符編碼-- meta charset= UTF-8 !--======name屬性=======-- !--description(網站內容描述)-- !--說明:description用來告訴搜索引擎你的網站主要內容-- meta name= description content= haorooms博客,html的meta總結,meta是html語言head區的一個輔助性標簽。 !--Keywords(關鍵字)-- meta name= keywords content= meta總結,html meta,meta屬性,meta跳轉 !--aut |
> 英文、中文強制換行與不換行的css代碼 | 未知 | 2019-02-24 | 875 |
結構: p class= p1 1.Transshipment Booking System is launched只對英文起作用,以字母作為換行依據 /p p class= p2 2.Transshipment Booking System is launched只對英文起作用,以單詞作為換行依據 /p p class= p3 3.Transshipment Booking System is launched只對中文起作用,強制換行 /p p class= p4 4.Transshipment Booking System is launched強制不換行,都起作用 /p p class= |
> CSS自動換行、強制不換行、強制斷行、超出顯示省略號 | 未知 | 2019-02-24 | 1675 |
P標簽是默認是自動換行的,因此設置好寬度之后,能夠較好的實現效果,但是最近的項目中發現,使用ajax加載數據之后,p標簽內的內容沒有換行,導致布局錯亂,于是嘗試著使用換行樣式,雖然解決了問題,但是并沒有發現本質原因,本質在于,我當時獲取的數據是一長串的數字,瀏覽器應該是對數字和英文單詞處理方式相近,不會截斷。 先給出各種方式,再具體介紹每一個屬性。 強制不換行 p { |
> iframe去邊框無邊框使用技巧大全 | 未知 | 2016-05-14 | 1955 |
javascript 代碼 復制內容到剪貼板 iframe src= http://www.vk30.cn/newjs.php width= 100 height= 30 frameborder= no border= 0 marginwidth= 0 marginheight= 0 scrolling= no allowtransparency= yes /iframe iframe runat= server src= http://www.vk30.cn/newjs.php width= 750 height= 30 frameborder= no border= 0 marginwidth= 0 marginheight= 0 scrolling= no allow |
> SQL函數匯總精選 | 未知 | 2016-05-14 | 1717 |
1.絕對值 SQL:select abs(-1) value O:select abs(-1) value from dual 2.取整(大) S:select ceiling(-1.001) value O:select ceil(-1.001) value from dual 3.取整(。 S:select floor(-1.001) value O:select floor(-1.001) value from dual 4.取整(截。 S:select cast(-1.002 as int) value O:select trunc(-1.002) value from dual 5.四舍五入 S:select round(1.23456,4) value |
> 返回上一頁并刷新代碼匯總 | 未知 | 2014-08-20 | 2481 |
一:JS 重載頁面,本地刷新,返回上一頁 復制代碼 代碼如下: a href= javascript:history.go(-1) 返回上一頁 /a a href= javascript:location.reload() 重載頁面,本地刷新 /a a href= javascript:history.go(-1);location.reload() 返回上一頁重載頁面,本地刷新 /a 返回前二頁并刷新的JS代碼應該怎樣寫。 復制代碼 代碼如下: history.go(-2); location.reload(); 二:js 方法 復制代碼 |
> JavaScript Window Location | 未知 | 2014-06-22 | 2964 |
window.location 對象用于獲得當前頁面的地址 (URL),并把瀏覽器重定向到新的頁面。 Window Location window.location 對象在編寫時可不使用 window 這個前綴。 一些例子: location.hostname 返回 web 主機的域名 location.pathname 返回當前頁面的路徑和文件名 location.port 返回 web 主機的端口 (80 或 443) location.protocol 返回所使用的 web 協議(http:// 或 https://) Wind |
> JavaScript Window History | 未知 | 2014-06-22 | 2949 |
window.history 對象包含瀏覽器的歷史。 Window History window.history 對象在編寫時可不使用 window 這個前綴。 為了保護用戶隱私,對 JavaScript 訪問該對象的方法做出了限制。 一些方法: history.back() - 與在瀏覽器點擊后退按鈕相同 history.forward() - 與在瀏覽器中點擊按鈕向前相同 |
> JavaScript 中創建三種消息框:警告框、確認框、提示框 | 未知 | 2014-06-22 | 2852 |
警告框 警告框經常用于確保用戶可以得到某些信息。 當警告框出現后,用戶需要點擊確定按鈕才能繼續進行操作。 語法: alert( 文本 ) 確認框 確認框用于使用戶可以驗證或者接受某些信息。 當確認框出現后,用戶需要點擊確定或者取消按鈕才能繼續進行操作。 如果用戶點擊確認,那么返回值為 true。如果用戶點擊取消,那么返回值為 false。 語法: confirm( 文本 ) 提示框 提示框經常用于提 |
> 縮放圖片大的CSS代碼 | 未知 | 2012-12-10 | 3099 |
CSS縮放圖片大小 css 代碼 復制內容到剪貼板 #imgfix _b { max-width : 250px ; max-height : 200px ; width :expression(this. width 250 ? 250px : this. width ); height :expression(this. height 200 ? 200px : this. height ); overflow : hidden ; } |
> js里判斷輸入的密碼不能單為數字 | 未知 | 2012-12-10 | 3894 |
js里判斷輸入的密碼不能單為數字 javascript 代碼 復制內容到剪貼板 function check_num_str(s) { //if (!/^\d{6}$/.test(s)) return false; // 不是6位數字 if (s== || s.length==0) return false ; if (s.length 12 || s.length 6) return false ; if (!s.match(/[a-zA-Z0-9]$/)) return false ; if (/^(\d)\1+$/.test(s)) return false ; // 全一樣 var str = s.replace(/\d/g, funct |
> 仿百度搜索框輸入效果 | 未知 | 2012-12-10 | 3615 |
xhtml 代碼 復制內容到剪貼板 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns = http://www.w3.org/1999/xhtml head title 仿百度搜索的下拉框效果 / title style type = text/css #search_id{font-size:12px; color:#333333} #search_id div{ float:left} #search_body{ border:1px solid #999999; |
熱點資訊
- 80931.服務器端世界時間(UTC)轉換客
- 57372.最佳免費文件管理軟件 Nexus
- 47473.在網頁中播放ASF流媒體文件的
- 47054.國外網站評出對程序員最具影
- 42765.9個最佳Ajax/Javascript資源
- 40686.Java性能優化技巧集錦三
- 39157.簡單漂亮的JS下拉菜單
- 39078.最小的AJAX類庫 microajax
- 38949.js里判斷輸入的密碼不能單為
- 387710.Url相對路徑和絕對路徑的問題
內容檢索
站內搜索:
贊助商廣告