10.07.2017 Views

javascript_tutorial

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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!