موقع الرياضيات العربية أون لاين

أ. محمد عبدالمنعم الملط
مؤسس الموقع يرحب بكم
فى
موقع الرياضيات العربية أون لاين
أشهر مواقعى
www.mathtech.co.nr



انضم إلى المنتدى ، فالأمر سريع وسهل

موقع الرياضيات العربية أون لاين

أ. محمد عبدالمنعم الملط
مؤسس الموقع يرحب بكم
فى
موقع الرياضيات العربية أون لاين
أشهر مواقعى
www.mathtech.co.nr

موقع الرياضيات العربية أون لاين

هل تريد التفاعل مع هذه المساهمة؟ كل ما عليك هو إنشاء حساب جديد ببضع خطوات أو تسجيل الدخول للمتابعة.

برمجيات الرياضيات لجميع المراحل التعليمية


    If...else Statement

    Admin
    Admin
    Admin


    عدد المساهمات : 100
    تاريخ التسجيل : 16/02/2011

    If...else Statement Empty If...else Statement

    مُساهمة  Admin الثلاثاء فبراير 22, 2011 5:19 pm

    If...else Statement
    Use the if....else statement to execute some code if a condition is true and another code if the condition is not true.

    Syntax
    if (condition)
    {
    code to be executed if condition is true
    }
    else
    {
    code to be executed if condition is not true



    <script type="text/javascript">
    //If the time is less than 10, you will get a "Good morning" greeting.
    //Otherwise you will get a "Good day" greeting.

    var d = new Date();
    var time = d.getHours();

    if (time < 10)
    {
    document.write("Good morning!");
    }
    else
    {
    document.write("Good day!");
    }
    </script>


    }


      الوقت/التاريخ الآن هو السبت أبريل 27, 2024 3:27 pm