How to automatically run this code

时光总嘲笑我的痴心妄想 提交于 2019-12-13 04:39:42

问题


you are always such an incredible help to me ... but, Im really stumped here.

http://canboria.co.za/PHP/CALCULATOR/bond.htm

A basic bond/mortgage calculator that I have worked out using some online refs & a little modification.

How can I make this script work out the details on page loading (i did try action onload but, didnt do the trick ... kept running a loop & times out)

Ideally, I want to have that each time a value is altered, it should work out the REPAYMENT VALUE ... any help, ideas or guidence greatly appreciated!


回答1:


The window.onload function seems to work for me.

Working Example

By simply adding this code

window.onload=giveAnAnswer;


来源:https://stackoverflow.com/questions/23683453/how-to-automatically-run-this-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!