验证php到js验证

时间:2013-08-16 20:38:05

标签: php javascript captcha

我用php编写我想编写这段代码,但函数onclick javascript中有错误

<?php

if(isset($_POST["captcha"]))
{
    if($_POST["captcha"]==$_SESSION["code"])
    {
    echo "Correct";
    }
    else
    {
    echo "Not Correct";
    }
}
?>

的Javascript

function ja_k2filter_submit()
    {
    var captcha = $('captcha');
        var code = $('code');
        if ($code = '');
        {
            alert("Güvenlik Kodunu Doğrulayınız!");
        }
                return false;
        if ($code = captcha);


        if($('input_searchword'))
        {

            input = $('input_searchword');
            v_label = ($$('label[for=input_searchword]')[0].innerHTML)+'...';
            if((input.value !='')&&(input.value!=v_label))
            {
                $('mod_ja_searchword').value =input.value;
            }   
        }

javascript值,但不是

0 个答案:

没有答案