大家看看有什么错误
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>字符串对象的属性 </title>
<script type="text/javascript">
function format(x){
var code='var y=document.getElementById("str").value;alert(x+y);'
var myFunc=new Function("x",code);
var code2='document.getElementById("func").innerText=myFunc.toString();';
var myFunc2=new Function(code2);
</script>
</head>
<body>
<input type="text" id="str" value=""/>
<hr/>
<button onclick="myFunc("你填写的内容是:");">显示填写的内容</botton>
<hr/>
<button onclick=" myFunc2();">显示myfunc函数</button><br/>
<span id="func"></span>
</body>
</html>
大家看看我这个写的有什么错误啊,能帮助解释一下function format(x)函数的详细调用过程的更加感谢啊