-1

我无法提交表格;!!

function loginSubmit()
    {
        if(!isSubmitted){
            if(jQuery('#frmLoginStart').validationEngine('validate') != true)
                return false;
            isSubmitted = true;
            document.frmLoginStart.submit();
        }
    }   


    <form action="/esube/logon/loginend.jsp" method="post" name="frmLoginStart" id="frmLoginStart">     
                                                <input type="hidden" value="tr_TR" name="rdLng" >

<input type="text"  name="txtUsername" id="txtUsername">

<input type="password"  name="txtPassword" id="txtPassword">
    <a title="GİRİŞ" class="btnType2 button2" onclick="loginSubmit();return false;" name="btnSubmit" href="javascript:;"><span></span>GİRİŞ</a>
    </form>

卷曲错误 卷曲提交点击链接 没有提交按钮困难我说土耳其语请帮助

$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/19.0.2");
curl_setopt($ch, CURLOPT_COOKIEFILE, getcwd().'/cookie.txt');

curl_setopt($ch, CURLOPT_URL, "https://esube1.ziraatbank.com.tr/esube/logon/loginstart.jsp");

$postu = "rdLng=tr_TR&txtUsername=51253433&txtPassword=976035";

curl_setopt($ch, CURLOPT_URL, 'https://esube1.ziraatbank.com.tr/esube/logon/loginend.jsp');

bu nasıl bir 网站 anlamadım yazdığım kodları almıyor

4

2 回答 2

1

最好使用事件绑定来提交表单,而不是触发它的链接。如果表单已提交并且存在验证错误,您正在尝试收集全局变量isSubmitted,我正确吗?

var isSubmitted = false;
$(document).ready(function () {
    $('form[name=frmLoginStart]').submit(function (e) {
        if ($(this).validationEngine('validate') != true) {
            e.preventDefault();
            isSubmitted = true;
        }
    });
});  


<form action="/esube/logon/loginend.jsp" method="post" name="frmLoginStart" id="frmLoginStart">     
    <input type="hidden" value="tr_TR" name="rdLng" autocomplete="off">
    <input type="text"  size="20" maxlength="10" value="" autocomplete="off" name="txtUsername" id="txtUsername">
    <input type="password" size="20" maxlength="5" autocomplete="off" name="txtPassword" id="txtPassword">
    <button type="submit" class="btnType2 button2" name="btnSubmit"><span></span>GİRİŞ</button>
</form>
于 2013-03-12T16:14:57.397 回答
0

我认为您正在尝试自动登录到位于https://esube1.ziraatbank.com.tr/esube/logon/loginstart.jsp?rdLng=EN.

该登录表单使用 javascript。Curl 不执行 javascript。因此,您的方法将行不通。你至少需要一些可以执行 javascript 的东西。

PS。在发布到公共论坛之前,您可能希望剥离您银行帐户的用户 ID 和密码。

于 2013-03-12T16:37:49.400 回答