![]() |
|
|
+ Search |
![]()
|
Apr 5th, 2008 20:32
ha mo, sven vahar, Dan,
This works with IE & NS6+. Remeber, onchange fires when element loses
focus so you have to move focus from the input to see whoa() in action.
<html>
<head>
<title> * </title>
<script language="JavaScript" type="text/javascript">
<!--
function init(){
var x = document.getElementsByTagName('body')[0];
var y = document.createElement('form');
var z = document.createElement('input');
z.setAttribute('name','foo');
z.onchange = whoa;
y.appendChild(z);
x.appendChild(y);
};
function whoa (){
alert('yea, you changed me');
};
// -->
</script>
</head>
<body onload="init()">
</body>
</html>
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com