求解prompt(str1,str2);str2中可以写代码吗?为什么例题上没有写呢?
<html>
<head>
<meta http-equiv="content_type"content="text/heml;charset=utf-8"/>
<title>prompt</title>
<script typr="text/javascript">
var myname=promrt("请输入你的名字","小胖")
if(myname==小胖)
{alert("hello"+myname)
else
{alert("hello myfriend")
</script>
</head>
<body>
<input="button" type="button" onclick="rec"()"
value="点击我交个朋友啊,"/>
</body>
</html>