2008年9月22日星期一

Prototype JS Event.observe

CODE:
/*
*you'd want this line of code to run once the form exists in the DOM; but putting *inline scripts in the document is pretty obtrusive, so instead we'll go for a simple *approach that waits till the page is fully loaded:
*/
Event.observe(window, 'load', function() {
Event.observe('percent', 'change', selectProPercent);
}

in main.js:
var selectProPercent = function()
{
......
}

没有评论: