我的代码有什么错误_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");
}
把两个文件放在同一个文件夹试试.
Test.html 内容
Test.js 内容
function Myfunc()
{
document.writeln("Hello world");
}
回复讨论(解决方案)
Test.js 内容
function Myfunc()
{
alert("Hello World!');
document.writeln("Hello world");
}
把两个文件放在同一个文件夹试试.
试了,没什么效果
找到问题了
写成 就好
推荐阅读
-
我的代码有什么错误_html/css_WEB-ITnose
-
当我谈缓存的时候,我谈些什么_html/css_WEB-ITnose
-
当我谈缓存的时候,我谈些什么_html/css_WEB-ITnose
-
为什么我的width不起作用?_html/css_WEB-ITnose
-
各位大神,小弟刚刚才开始自学html,按教学方法嵌入两个网页,为什么只显示出一个啊,我都对着代码敲了_html/css_WEB-ITnose
-
我这个li中的文字为什么在chrome下无法垂直居中?_html/css_WEB-ITnose
-
我网站上的视频为何有一杠不知名的花纹_html/css_WEB-ITnose
-
以下代码在我的浏览器上老报错_html/css_WEB-ITnose
-
我这个li中的文字为什么在chrome下无法垂直居中?_html/css_WEB-ITnose
-
如何在blur或focusout事件里得到即将得到焦点的元素?另外这两个事件有什么区别?_html/css_WEB-ITnose