Search This Blog

Wednesday, October 10, 2012

How to set event and attribute to a control from javascript.

var objMy = document.getElementById("ddlMy"); //objMy.setAttribute(name,value); objMy.setAttribute("onchange","test();"); function test() { alert('test'); }

No comments:

Post a Comment