为什么第一个alert那么奇怪呢,没有样式呢
<html><head>
<title>
字符串数据类型
</title>
</head>
<body>
<script type="text/javascript">
//<![CDATA[
var str="hello";
str=str+" world";
document.write(str);
var str="hello world \n\ i like javascript";
alert("<h1 style='font-family:Times'>"+str+"</h1>");
var str="hello";
var strobj=new String("hello");
alert(str==strobj);
if(str.constructor==String){
document.write("字符串类型")};
document.write(str.length);
document.write("<p>"+str.small()+"</p>")
var str1="visit m";
document.write(str1.replace(/m/,"w4"));
//]]>
</script>
</body>
</html>