0

什么javascript代码可以实现一个自我点击这个表单?

  <head><script language=JavaScript1.2></script>
    </head>
    <body>
    <form action="http://www.tumblr.com/follow" id="FormType"  method="post" style="display:block; float:left;" onsubmit="_gaq.push(['_trackEvent', 'Iframe', 'Follow', 'c-h-o-c-o-l-a-t-a');">

                            <input type="hidden" name="form_key" value="QT4EOzpHQoAwecU3oWHu0uThVY">
                            <input type="hidden" name="id" value="c-h-o-c-o-l-a-t-a">
                            <input type="image" src="http://assets.tumblr.com/images/iframe_follow_alpha.png?1037" style="width:58px; height:20px; border-width:0px; display:block; margin-left:3px; cursor:pointer;" alt="Follow" name="image" id="followbb">

                        </form>
</body>
4

1 回答 1

0

将此脚本放在<head>

<script type="text/javascript">
  function autoClick () {
    document.forms["FormType"].submit();
   }
 window.onload = autoClick;
</script> 

当文档完成加载表单将被提交(魔术!)。

于 2012-08-26T00:05:41.067 回答