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>
Was it helpful?

Solution

this won't work:

document.alert("hope to work");

this will

alert("hope to work");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top