Q
quoclinh
Hi,
I'd like to create an input button with a click event calling a
javascript function. pretty basic. I just can't figure out how to
wire the onclick event. this is what I have so far:
function createButton(text, clickEvent)
{
var btn = document.createElement('input');
btn.type = 'submit';
btn.value = text;
//How to code click event here?
//How to set default css class?
return btn;
}
Your help is much appreciated.
Quoc Linh
I'd like to create an input button with a click event calling a
javascript function. pretty basic. I just can't figure out how to
wire the onclick event. this is what I have so far:
function createButton(text, clickEvent)
{
var btn = document.createElement('input');
btn.type = 'submit';
btn.value = text;
//How to code click event here?
//How to set default css class?
return btn;
}
Your help is much appreciated.
Quoc Linh