Question

I can't find my error. I looked at the other topics but no luck.

<div>
    <input id="date1" name="date1" type="date"> 
    <input id="date2" name="date2" type="date" onchange="date()">   
    <input id="date_diference" name="date_diference" type="date">

    <script type="text/javascript">
    function date(){
        document.alert("hope to work");
    }
    </script>
</div>
Était-ce utile?

La solution

this won't work:

document.alert("hope to work");

this will

alert("hope to work");
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top