欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

我的代码有什么错误_html/css_WEB-ITnose

程序员文章站 2024-02-01 15:39:40
...
本人刚学 Html 和 JS 写了下面2个文件 感觉应该显示 Hello world 但实际是什么也不显示,请问我错在哪?

Test.html 内容



Example









Test.js 内容
function Myfunc()
{
document.writeln("Hello world");
}


回复讨论(解决方案)




Example










Test.js 内容
function Myfunc()
{
alert("Hello World!');
document.writeln("Hello world");
}

把两个文件放在同一个文件夹试试.

试了,没什么效果

找到问题了
写成 就好

相关标签: 代码 错误