# Put html event code on a button

**URL:** <https://forum.kirupa.com/t/put-html-event-code-on-a-button/175614>\
**Category:** Uncategorized\
**Created:** [January 16, 2006, 12:20pm UTC](https://forum.kirupa.com/t/put-html-event-code-on-a-button/175614 "2006-01-16T12:20:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakepeg](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@jakepeg](https://forum.kirupa.com/u/jakepeg)\
**Post date:** [January 16, 2006, 12:20pm UTC](https://forum.kirupa.com/t/put-html-event-code-on-a-button/175614/1 "2006-01-16T12:20:41Z")

</div>

Hi

I want to put this code onto a button. how?

```auto

<a HREF onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://javascriptkit.com');"> Click here to make this your homepage</a

```
