var name="alone88"; document.write(name);
2018-05-140個贊
所屬章節(jié)課程:JavaScript中的字符方法:不知不覺中你一直在用它
to.LowerCase()轉(zhuǎn)換成小寫?
2018-05-150個贊
所屬章節(jié)課程:JavaScript對象小揭密:我就偷看一眼不說話
除了undefined和null其Ta都是我的對象?
2018-05-150個贊
所屬章節(jié)課程:屬性節(jié)點的增刪改查:控制元素最有效的手段
## **JavaScript增刪改查** 第一種 .(點操作符) ```JavaScript 不加='',則是查看內(nèi)容,加了就是增加或修改 var h2 = document.getElementsByTagName('h2');//先定義變量 h2.ClassName ='class'//增加或修改Class的內(nèi)容 h2.Id = 'id'//增加或修改id的內(nèi)容 h2.style.color ='red' //增加或修改style的內(nèi)容,style. ``` 第二種:Attribute(屬性) ``` h2.getAttribute('屬性名')//獲取屬性; h2.setAttribute('屬性名','要修改的內(nèi)容')//修改 h2.removeAttribute('屬性或元素')//刪除 ``` 第三種:attributes ``` h2.attributes//獲取屬性 h2.attributes[索引]; h2.attributes['屬性']; h2.attributes['屬性'].nodeType='修改的內(nèi)容'//修改 h2.attributes.removeNamedItem('屬性')//刪除內(nèi)容
2018-05-181個贊
所屬章節(jié)課程:子節(jié)點類型判斷與操作:并非所有節(jié)點都是我的所愛
var Value =document.getElementsByTagName("標簽"); for(var i = 0;i<li.length;i++){ li[i].style.color="" }
2018-05-190個贊
所屬章節(jié)課程:獨立安裝(一):Apache服務安裝與測試
1:DocumentRoot <Directory>
2018-05-210個贊
所屬章節(jié)課程:獨立安裝(二):PHP與Apache整合
loadModule
2018-05-210個贊
非常強大
$,@添加序號
2018-05-210個贊