您现在的位置是:首页 > 电脑技术查询 > web开发

这样也不行?解决方法

编辑:chaxungu时间:2022-10-02 23:18:30分类:web开发

这样也不行?
<html>
<head>
<title> test </title>
<script type= "text/javascript ">
function sayhello()
{
alert ( "say fuck ");
}
</script>
</head>
<body>
<script type= "text/javascript ">
sayhell();
</script>
</body>
</html>

我在head里定义sayhello函数,然后在body里将其执行,这样也不行?一定要
<script type= "text/javascript ">
function sayhello()
{alert( "you ");
}
sayhello();
</script>
这样写在一起才行?

------解决方案--------------------
<script type= "text/javascript ">
sayhell();
</script>
???
sayhello()你少了个o....