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

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -