开发者

Submit Button mousedown event

I had a question regarding a mousedown image swap with a submit button. here is the submit button code:

<input src="submit.png" type="image" class="submit" id="submit">

I tried to add an event using what I normally use for mousedown image swaps,

onmousedown="MM_swapImage('Image1','','submit_down.png',1)" onmouseup="MM_swapImgRestore()"/>

But I can't use the id of submit in the mousedow开发者_JS百科n code, because I think it's associated with the button rather than an image.

Thanks,

Luke


I think what you really want to do here is change your submit button a bit. Usually you would have name="submit", if you changed to that, you should be able to change the id to anything you want. The only reason this wouldn't work is if your using the id attribute in order to do something with some js onmousedown somewhere else?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜