is this possible?
I will change var
you can use new Function MDN
body:
On Load raise an Alert
js:
var myFunc = myFunc || document.getElementById('MyFunc'), hello = new Function( myFunc.getAttribute('func')); hello.call(this);
give it a try:
http://jsfiddle.net/msLsy/
Hope it helps!