一.JavaScript
? ? document (整個頁面)
? ? ? ? 獲取頁面標(biāo)題:document.title
? ? ? ? 通過標(biāo)簽名獲取元素,返回的是一個列表:document.getElementsByTagName('a')[0]
? ? ? ? 通過ID獲取元素:document.getElementById('note-51387045')
? ? ? ? 修改內(nèi)容:document.getElementsByTagName('a')[0].innerText = 'aa'
? ? ? ? 修改顏色:document.getElementsByTagName('a')[0].style.color='red'
? ? ? ? 函數(shù):document.getElementsByTagName('a')[0].onclick = function(){alert('1')}
? ? window(整個窗口)????
? ? ? ? 移到頁面底部
? ??????window.scrollTo(0,document.body.scrollHeight)
? ? ? ? 移到頁面頂部
? ? ? ? window.scrollTo(document.body.scrollHeight,0)