10.02.2018 Views

js_tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Javascript<br />

Try the following example.<br />

<br />

<br />

JavaScript String fixed() Method<br />

<br />

<br />

<br />

var str = new String("Hello world");<br />

alert(str.fixed());<br />

<br />

<br />

<br />

Output<br />

Hello world<br />

fontColor ()<br />

This method causes a string to be displayed in the specified color as if it were in<br />

a tag.<br />

Syntax<br />

Its syntax is as follows:<br />

string.fontColor( color)<br />

Attribute Details<br />

color: A string expressing the color as a hexadecimal RGB triplet or as a string<br />

literal.<br />

Return Value<br />

Returns the string with tag.<br />

Example<br />

Try the following example.<br />

<br />

168

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!