1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

AJAX HElp

Discussion in 'JavaScript and AJAX' started by dj_buddhika, Feb 23, 2008.

  1. dj_buddhika

    dj_buddhika New Member

    Joined:
    Dec 7, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    document.getElementById("div_id_naMr").innerHTML="hello"; will display the hello text in the web browser . i just want to diplay the hello in the web browser in the red color . How to color up the text with ajax

    i want to keep the color in the javascript file
     
  2. Ami Desai

    Ami Desai Member

    Joined:
    Jan 5, 2017
    Messages:
    42
    Likes Received:
    17
    Trophy Points:
    8
    Location:
    Ahmedabad
    Home Page:
    Hi,

    You can check this
    Code:
    var elem = document.getElementById("div_id_naMr");
    elem.innerHTML = "hello";
    elem.style.color = "Red";
    Thanks
     

Share This Page