Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jquery表单验证。没有插件_Jquery - Fatal编程技术网

jquery表单验证。没有插件

jquery表单验证。没有插件,jquery,Jquery,使用jQuery检查表单字段中的值的正确格式是什么 $(document).ready(function () { // Focus on first form field. $("input:text:visible:first").focus(); if ($('#movie_title') == "") { alert("No Film"); } }); 您需要使用来获取输入字段的值 $(document).ready(function

使用jQuery检查表单字段中的值的正确格式是什么

$(document).ready(function () {
    // Focus on first form field.
    $("input:text:visible:first").focus();

    if ($('#movie_title') == "") {

        alert("No Film");
    }
});
您需要使用来获取输入字段的值

$(document).ready(function(){
    if ($('#movie_title').val() == "" ) {
        alert ("No Film");
    }

    // Focus on first form field.
    $("input:text:visible:first").focus();
}); 

$('movie'u title').val()哦,我明白了。我对Jquery相当陌生,只是想知道这两个Javascript函数的等价物是什么。因此,Document.getElementById()innerHTML()Hope具有一定的意义。