Jump to content


This topic is now archived and is closed to further replies.


JavaScript and BUTTON

Recommended Posts

Hi all GURUs!

I would like to create a BUTTON with the <button></button> HTML code.
In this <button> I'd like to add onClick function with the Javascript function to load a new page. I do not want to use the <A HREF> functionality.

I think it would look something like this:
[code]<button onClick="javascript:[b]the code I don't know[/b]" >click here to go on</button>[/code]

What is the [b]javascript code[/b] I'm after?

Thank you all in advance for any kind of help!


Share this post

Link to post
Share on other sites

maybe try to do something like:

<button onClick="javascript:testing()" >click here to go on</button>

& the javascript part could be:
function testing()
hoping it helps,


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.