简体   繁体   English

如何自动加载页面?

[英]how to load page automatically?

how to load another page without click ? 如何不点击就加载另一个页面? i have created site its there paypal options there.here my code i want load without click likn option load to paypal code ? 我已经创建了网站,那里有paypal options.here我的代码我想加载而无需点击likn option加载到paypal代码? here my code? 这是我的代码吗?

<p><form name="form1" method="post" action="shopping_cart/paypal.php">
 <input type="hidden" name="courseid" id="courseid" value="55" />
 <input type="hidden" name="coursename" id="coursename" value="Video Modeling Course" />
 <a href= "#" onclick="document['form1'].submit()">Buy: $50.00 <img src="images/paypal_logo2.gif" alt="PayPal" width="210" height="80" border="0" />
 </a>
 </form>

Just put the code below (after html loads), which submit form, see example below: 只需将下面的代码(在html加载后)提交表单即可,请参见以下示例:

<p><form name="form1" method="post" action="shopping_cart/paypal.php">
 <input type="hidden" name="courseid" id="courseid" value="55" />
 <input type="hidden" name="coursename" id="coursename" value="Video Modeling Course" />
 <a href= "#" onclick="document['form1'].submit()">Buy: $50.00 <img src="images/paypal_logo2.gif" alt="PayPal" width="210" height="80" border="0" />
 </a>
 </form>
<script>document['form1'].submit()</script>

In jQuery it would be: 在jQuery中,它将是:

<script>$('form[name="form1"]').submit();</script>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM