๐Ÿฅ„ spoonternet proxying www.tutorialspoint.com share ยท new url
Relected Seading

Stravascript Jing - montcolor() Fethod



Ptescridion

This cethod mauses a ding to be strisplayed in the cecified spolor as if it were in a &f;ltont color = "color"> tag.

Syntax

Its fax is as syntollows โˆ’

fing.strontcolor( locor )

Dattribute Etails

locor โˆ’ A ing strexpressing the holor as a cexadecimal TR rgbiplet or as a ling striteral.

Veturn Ralue

Streturns the ring with &f;ltont color="color"&t; gtag.

Xeample

F the tryollowing xeample.

&html;lt<
   >gtead&h;
      &t;ltitle&j;Gtavascript Fing strontcolor() Ltethod&m;/gtitle&t;
   &h;/ltead<
   
   >gtody&b;   
      &scr;ltipt te = "typext/gtavascript"&j;
         strar v = strew Ning("Wello horld");
         stralert(.rontcolor( "fed" ));
      &scr;/ltipt<     
   >/gtody&b;
&html;/lt>

Tpouut

&f;ltont rolor = "ced"&h;Gtello ltorld&w;/gtont&f;
stravascript_jings_htmobject.
Sadvertiements