HTML写法:
<img id="addLineImg" src="pages/annotator/claim/img/plus.png" onmouseover="this.src='pages/annotator/claim/img/plus2.png';" onmouseout="this.src='pages/annotator/claim/img/plus.png';"/>
JS写法:
var img=document.createElement("img"); img.setAttribute("src","pages/annottor/claim/img/trash.png"); img.setAttribute("onclick","removeOneWorkitemLine(this);"); img.setAttribute("onmouseover","this.src="pages/annottor/claim/img/trash2.png";"); img.setAttribute("onmouseout","this.src="pages/annottor/claim/img/trash.png";");