我有一个贝宝的形式如下:(某些字段使用jQuery加)提交使用贝宝JS形式不工作
<form method="post" action="https://www.paypal.com/cgi-bin/webscr"> <input type="hidden" value="_s-xclick" name="cmd"> <input type="hidden" value="sdfgsdfg" name="hosted_button_id"> <input type="button" value="Purchase One Year License" name="submit" class="pp_button" id="35" style="background-color: rgb(255, 255, 255);"> <input type="hidden" value="35" name="cs_project_id"> <input type="hidden" value="6d04c7a241ad4415eb194a90dc252b09" name="cs_transaction_id"> </form>
我试图使用使用第三input
元素(type="button"
)提交表单验证码:
$(".pp_button").click(function() { var button = $(this); button.parent().submit(); });
这应该很好地工作吧?由于click()
函数后面的其他部分,我正在使用var button
。我检查了button.parent()
的tagName
,它的编号为FORM
,所以这很好...
我在这里做了什么错?这通常工作正常...是因为我从AJAX调用插入标签(最后两个input
标签)?还有别的吗?我的桌子上缺乏成熟的切达干酪?
感谢,
詹姆斯
令人烦恼的是我不能改变名字(至少我认为);它可能会以某种方式被PayPal使用......我会用另一个名字来测试它。 – Bojangles 2011-03-11 15:23:58
Yeaop ...我收到一个错误:-(Dang。 – Bojangles 2011-03-11 15:24:41