如何自动加载页面?

时间:2015-06-30 14:59:46

标签: php jquery html paypal

如何在不点击的情况下加载其他页面?我已经创建了网站有paypal选项那里。我的代码我想加载没有点击likn选项加载到贝宝代码?我的代码?

<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>

1 个答案:

答案 0 :(得分:6)

只需输入以下代码(在html加载之后),提交表单,请参阅下面的示例:

root = ET.fromstring( xml_string )
for entry in root[0][0][1].iter():
  print entry.text

在jQuery中它将是:

<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>