سؤال

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>
هل كانت مفيدة؟

المحلول

this won't work:

document.alert("hope to work");

this will

alert("hope to work");
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top