首页 > 代码库 > input 获取当前id,name

input 获取当前id,name

<input name="music" type="image" id="music" onclick="loadmusic(this)" size="6" src=http://www.mamicode.com/"toright.png" value=http://www.mamicode.com/"mp3"><script language="javascript">function loadmusic(o){   alert(name=+o.name+ / id=+o.id);}</script>

 

input 获取当前id,name