小编use*_*121的帖子

验证密码和重新输入密码

我有两个这样的文本框:

<p>
<input type="text" name="NPassword" placeholder="New Password"/></p>
<input type="text" name="RNPassword" placeholder="Retype New Password"/>
Run Code Online (Sandbox Code Playgroud)

现在,我想要的是在Retype New Password的每个按键上它应检查两者是否相同.如果是,则以绿色显示在RNPassword的右侧,否则在红色显示中两者都不相同也是禁用页面的提交按钮.如何做到这一点,请帮助.

javascript ajax jquery

2
推荐指数
1
解决办法
2万
查看次数

使用html5验证电子邮件

我的表单中有一个文本框:

<input type="text" pattern="/^([A-Za-z0-9_\-\.]+)\@([A-Za-z0-9_\-\.]+)\.([A-Za-z]{2,4})$/" title="Enter Valid EmailId" name="NEmail" placeholder="New Email Id" id="txtNewId"/>
Run Code Online (Sandbox Code Playgroud)

现在,即使我点击提交按钮输入有效的电子邮件ID,它仍然显示无效.请帮助我错了.

javascript ajax jquery html5

2
推荐指数
1
解决办法
86
查看次数

Ajax调用复选框

我有一个两个复选框.现在点击其中一个复选框我要对jsp页面进行ajax调用.该jsp页面将显示一个包含从数据库中获取的数据的表.

现在,问题是我有两个复选框,如:

<div class="search-inputs">

        <input class="searchName" type="text" placeholder="Search Here.."></input>

        <input class="searchType1" type="checkbox" name="emailNotification"><label class="searchtype1label">Email Notification</label></input>
        <input class="searchType2" type="checkbox" name="SharingNotification"><label class="searchtype2label">File Sharing Notification</label></input>


        <input class="searchDateFrom" type="text" placeholder="Search From"></input>
        <input class="searchDateTo" type="text" placeholder="Search To"></input>
        <input class="Datesubmit" type="button" value="Search"></input>
        <div id="container"></div>
Run Code Online (Sandbox Code Playgroud)

怎么做?请帮忙

My Script part : 

$(document).ready(function () {

            $('.search-select').on('change', function(){
            $('.search-inputs').children().hide();
            var classn =$(this).find(":selected").val();
            //alert(classn);
            if(classn=='searchName')
                {
                    //alert("searchname");
                    $('.'+"searchName").show();
                }
                else if(classn=='searchType')
                {
                    //alert("searchType");
                    $('.'+"searchType1").show();
                    $('.'+"searchtype1label").show();
                    $('.'+"searchType2").show();
                    $('.'+"searchtype2label").show();
                }
                else if(classn=='searchDate'){
                    //alert("searchType");
                    $('.'+"searchDateFrom").show();
                    $('.'+"searchDateTo").show();
                    $('.'+"Datesubmit").show();
                }

            });

            $('#emailNotification').on('change',function() {
            //var checked = …
Run Code Online (Sandbox Code Playgroud)

javascript ajax checkbox jquery jsp

1
推荐指数
1
解决办法
2万
查看次数

标签 统计

ajax ×3

javascript ×3

jquery ×3

checkbox ×1

html5 ×1

jsp ×1