attachEvent
Hi,
How does one attach an onclick even with arguments?
From the examples that I've been able to find online, they are just straight calls to the function. I want to be able to pass the string 'apple' in the example.. but it doesn't work..
function createTab(text)
{
var nLink = document.createElement("a");
nLink.href = "#";
nLink.attachEvent('onclick',something('apple'));
}
function something(arg)
{
alert (arg)
}
|