Autosubmit Form Menggunakan Jquery


Contoh kode :

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>id-youtube-music.blogspot.com</title>
  <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>

<form id="myform" action="insert-to-db.php" method="POST">
<input id="php" type="text" name="php" value="www-tips-triks-elektronika.php"><br />
<input id="table_db" type="text" name="table_db" value="www_tips_triks_elektronika"><br />
<input id="blogurl" type="text" name="blogurl" value="http://www-tips-triks-elektronika.blogspot.co.id"><br />
<input id="title" type="text" name="title" value="Title Example"><br />
<textarea id="desc" name="desc">Description example</textarea>
</form>

<script type="text/javascript">
var myVar;
function autosubmit() {
    myVar = setInterval(submit, 3000);
}
function submit() {
$("#myform").submit();
}
autosubmit();
</script>

</body>
</html>

Smoga bermanfaat....................!!!
Previous
Next Post »