getAttribute:取得属性;setAttribute:设置属性; 复制代码 代码如下: Untitled Document <BR> function change() {<BR> var input = document.getElementById("li1");<BR> alert(input.getAttribute("title"));<BR> input.setAttribute("title", "mgc");<BR> alert(input.getAttribute("title"));<BR> }<BR> Magci J2EE Haha!