javascript - Use a variable in setTimeout() to set the time -


here want timout in tout times, settimeout() not using tout timeout parameter. how solved.

<script language="javascript" type="text/javascript"> var tout=10*1000; var t = settimeout(document.myform.submit(),tout)); </script> 

var tout = 10 * 1000; var t = settimeout(function() {     document.myform.submit(); }, tout); 

read how use settimeout here. first argument should function reference , second timeout in milliseconds.


Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -