I have defined onclick event handler within the innerHTML property as
following:
var testButton1=oWi n.document.crea teElement("LABE L");
testButton1.inn erHTML="<input type='button' value='xx'
onclick=\"alert ('123')\">";
oLabel.appendCh ild(testButton1 );
the oLabel has already been append to document.body
however, this works in some computer but some are not. I've tried
computer with the same IE patch (6.0.2800.1106, sp1;Q867801;Q82 3353)
and the same windows version (2000 sp4),but this code just have
different behavior.
Is there anything I miss? Thank you!
following:
var testButton1=oWi n.document.crea teElement("LABE L");
testButton1.inn erHTML="<input type='button' value='xx'
onclick=\"alert ('123')\">";
oLabel.appendCh ild(testButton1 );
the oLabel has already been append to document.body
however, this works in some computer but some are not. I've tried
computer with the same IE patch (6.0.2800.1106, sp1;Q867801;Q82 3353)
and the same windows version (2000 sp4),but this code just have
different behavior.
Is there anything I miss? Thank you!
Comment