如何在jquery mvc中使列字段为null [英] How to make column field null in jquery mvc

查看:68
本文介绍了如何在jquery mvc中使列字段为null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们



我在MVC中使用webgrid,我想在验证后清除该字段。

我的代码是






Dear friends

I'm using a webgrid in MVC, I want to clear that field after the validation.
my code is



//To validate the date
function FutureDateValidation(Indx) {

    var ExpDateTxt = '#txtExpDate' + Indx.toString();
    var mCurDt = $('#CurDate').val();
    var ExpDate = $(ExpDateTxt).val();

   
    if (CompareDates(mCurDt, ExpDate) == false) {

        PopupMessage("Required", " The Expiry date should be greater than current date", "alert");

        //        $('#' + ExpDateTxt).tex = "";

        $('#' + ExpDateTxt).focus();
        e.stopPropagation();
        return false;

    }
    else {
        e.stopPropagation();
        return true;
    }
}











在消息弹出消息之后,我想清除或使#txtExpDate为空这个字段。

感谢您的帮助。






After the message popup message, i want to clear or make null #txtExpDate this field.
Thanks for ur help.

推荐答案

' #CurDate')。val();
var ExpDate =
('#CurDate').val(); var ExpDate =


(ExpDateTxt).val();


if (CompareDates(mCurDt,ExpDate)== false ){

PopupMessage( 必需 有效期应大于当前日期 alert);

//
(ExpDateTxt).val(); if (CompareDates(mCurDt, ExpDate) == false) { PopupMessage("Required", " The Expiry date should be greater than current date", "alert"); //


('#'+ ExpDateTxt)。tex =;
('#' + ExpDateTxt).tex = "";


这篇关于如何在jquery mvc中使列字段为null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆