String HTML Methods
Method | Output |
---|---|
anchor(name) | <a name="name">string</a> |
big() | <big>string</big> |
bold() | <b>string</b> |
fixed() | <tt>string</tt> |
fontcolor(color) | <font color="color">string</font> |
fontsize(size) | <font size="size">string</font> |
italics() | <i>string</i> |
link(url) | <a href="url">string</a> |
small() | <small>string</small> |
strike() | <strike>string</strike> |
sub() | <sub>string</sub> |
sup() | <sup>string</sup> |
<html>
<head>
<title>the date</title>
</head>
<body>
<script type="text/javascript">
var myString = new String();
myString = "java2s.com";
document.writeln(myString.anchor("java2s.com"));
document.writeln(myString.big());
document.writeln(myString.bold());
document.writeln(myString.fixed());
document.writeln(myString.fontcolor(color));
document.writeln(myString.fontsize(size));
document.writeln(myString.italics());
document.writeln(myString.link(url));
document.writeln(myString.small());
document.writeln(myString.strike());
document.writeln(myString.sub());
document.writeln(myString.sup());
</script>
</body>
</html>
Home
JavaScript Book
Essential Types
JavaScript Book
Essential Types
String:
- The String Type
- String length property
- String charAt()
- String charCodeAt()
- String concat()
- String slice()
- String substr()
- String substring()
- String indexOf()
- String lastIndexOf()
- String trim() Method
- String toLowerCase()
- String toLocaleLowerCase()
- String toUpperCase()
- String toLocaleUpperCase()
- String match()
- String search()
- String replace()
- String split()
- String localeCompare() Method
- String fromCharCode() Method
- String HTML Methods