如何自动加载页面?
how to load page automatically?
如何在不点击的情况下加载另一个页面?我已经创建了网站,它有 paypal 选项 there.here 我的代码我想加载而不点击链接选项加载到 paypal 代码?这是我的代码?
<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: .00 <img src="images/paypal_logo2.gif" alt="PayPal" width="210" height="80" border="0" />
</a>
</form>
只需将提交表单的代码放在下面(在 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: .00 <img src="images/paypal_logo2.gif" alt="PayPal" width="210" height="80" border="0" />
</a>
</form>
<script>document['form1'].submit()</script>
在 jQuery 中将是:
<script>$('form[name="form1"]').submit();</script>
如何在不点击的情况下加载另一个页面?我已经创建了网站,它有 paypal 选项 there.here 我的代码我想加载而不点击链接选项加载到 paypal 代码?这是我的代码?
<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: .00 <img src="images/paypal_logo2.gif" alt="PayPal" width="210" height="80" border="0" />
</a>
</form>
只需将提交表单的代码放在下面(在 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: .00 <img src="images/paypal_logo2.gif" alt="PayPal" width="210" height="80" border="0" />
</a>
</form>
<script>document['form1'].submit()</script>
在 jQuery 中将是:
<script>$('form[name="form1"]').submit();</script>