italics() 方法用于把字符串显示为斜体。
stringObject.italics()
在本例中,"Hello world!" 将被显示为斜体:
<html><body><script type="text/javascript">var str="Hello world!"document.write(str.italics())</script></body></html>
<html>
<body>
<script type="text/javascript">
var str="Hello world!"
document.write(str.italics())
</script>
</body>
</html>