1

enter code hereこれについて私に提案してください.. Date ref(java script) を作成している間、テキストボックスの値はdd/MM/yyyy形式として扱われるべきです..

function myFunction1(a)
{
       //Here the input format should be dd/MM/yyyy...
       //But Date ref taking it as MM/dd/yyyy
       var x=new Date(a);

       alert(x);

    if(x>new Date())
    {
    alert("Wrong date");
    }
    else
    {
    alert("Success");
    }
}

----
<input name="textbox1" id="textbox1" type="text" />
<input name="buttonExecute" onClick="myFunction1(document.getElementById('textbox1').value)" type="button" value="Execute" />
4

1 に答える 1