小弟五一回家去了,本想好好的享受下五一假期,誰知悲劇的人生不需要解釋。好不容易過五關斬十將,跨千山趟萬水,回到家裡。吃著老媽做的好菜,第二天就莫名其妙的急性腸炎,這肚子鬧騰的。NND,氣死哥了,早知道就不回家了。好了,廢話不多說,進入主題。
================
關於clientHeight、offsetHeight、scrollHeight
window.screen.availWidth 返回當前螢幕寬度(空白空間)
window.screen.availHeight 返回當前螢幕高度(空白空間)
window.screen.width 返回當前螢幕寬度(解析度值)
window.screen.height 返回當前螢幕高度(解析度值)
window.document.body.offsetHeight; 返回當前網頁高度
window.document.body.offsetWidth; 返回當前網頁寬度
=================================
純手工畫圖 不要鄙視 啊
================================
添加HTML內容與常值內容以前用的是innerHTML與innerText方法,
還有insertAdjacentHTML和 insertAdjacentText方法,
這兩個方法更靈活,可以在指定的地方插入html內容和常值內容。
insertAdjacentText方法與 insertAdjacentHTML方法類似,只不過只能插入純文字,參數相同
方法名稱:insertHtml(where,el,html)
參數介紹:
where:插入位置。包括beforeBegin,beforeEnd,afterBegin,afterEnd。
el:用於參照插入位置的html元素對象
html:要插入的html代碼
insertAdjacentHTML 方法:在指定的地方插入html標籤語句
原型:insertAdajcentHTML(swhere,stext)
參數:
swhere: 指定插入html標籤語句的地方,
stext:要插入的內容
有四種值可用:
1. befZ喎?http://www.bkjia.com/kf/ware/vc/" target="_blank" class="keylink">vcmVCZWdpbjogsuXI67W9serHqb+qyrzHsDxicj4KMi4gICAgIGFmdGVyQmVnaW46suXI67W9serHqb+qyryx6rzH1q668zxicj4KMy4gICAgIGJlZm9yZUVuZDqy5cjrtb2x6sepveHK+LHqvMfHsDxicj4KNC4gICAgIGFmdGVyRW5kOrLlyOu1vbHqx6m94cr4seq8x7rzPGJyPgo8L3A+CjxwPj09PT09PT09PT09PT09PT09PT09PT09PaG3v7TPwrT6wuuwyTwvcD4KPHA+PHByZSBjbGFzcz0="brush:java;"> 24.htm insertAdjacentHTML插入新內容 <script> function addsome() { document.all.paral.insertAdjacentHTML("afterBegin"," 在文本前容器插入入內容1"); document.all.paral.insertAdjacentHTML("beforeEnd"," 在文本後容器插入入內容2"); document.all.paral.insertAdjacentHTML("beforeBegin"," 在文本前容器外插入內容4"); document.all.paral.insertAdjacentHTML("afterEnd"," 在文本後容器外插入內容5"); } </script> 原來的內容 OK,先寫到這吧。