About 1,130,000 results
Open links in new tab
  1. JavaScript if, else, and else if - W3Schools

    Use the else if statement to specify a new condition if the first condition is false. If time is less than 10:00, create a "Good morning" greeting, if not, but time is less than 20:00, create a "Good …

  2. Conditional Formatting in HTML Tags - Stack Overflow

    Mar 10, 2015 · HTML was designed for document layout so the noscript and noframes are about as close as HTML gets to handling conditionals. You could conceivably approach this problem …

  3. if...else - JavaScript | MDN - MDN Web Docs

    Mar 13, 2025 · The if...else statement executes a statement if a specified condition is truthy. If the condition is falsy, another statement in the optional else clause will be executed.

  4. javascript - How to display different HTML elements in if …

    Dec 13, 2016 · Here is a native Javascript alternative. var el = document.getElementById('content'); var content; if (!user) { content = '<h1>there is no …

  5. How to use HTML in a Javascript if/else statement?

    Dec 8, 2015 · var something = confirm("Want to watch a video?"); if (something) { //Run the HTML to play the video } else { alert("Okay.");

  6. JavaScript if-else - GeeksforGeeks

    May 31, 2024 · JavaScript if-else statement executes a block of code based on a condition. If the condition evaluates to true, the code inside the "if" block executes; otherwise, the code inside …

  7. JavaScript if...else Statement (with Examples) - Programiz

    The JavaScript if…else statement is used to execute/skip a block of code based on a condition. In this tutorial, we will learn about the JavaScript if…else statement with examples.

  8. JavaScript if else statements - w3resource

    Aug 19, 2022 · In JavaScript if else statement executes a group of statements if a logical condition is true. Use the optional else clause to execute another group of statements.

  9. JavaScript If-Else and If-Then – JS Conditional Statements

    Aug 9, 2021 · In this article, I will explain what an if...else statement is and provide code examples. We will also look at the conditional (ternary) operator which you can use as a …

  10. Adding If / Else If Statment Inside Javascript HTML

    Jun 24, 2015 · So if you want to add in a if/ if else then you can do something like if (d.RES_GUEST_FIRSTNAME == "Alex") { returnString += '<p class="at-a-glance">Basic …

  11. Some results have been removed
Refresh