我的第一个javascript应用程序。你好世界警报框没有显示? [英] My first javascript app. Hello world alert box not showing?
本文介绍了我的第一个javascript应用程序。你好世界警报框没有显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好!
我创建了一个javascript应用程序:"Universal Windows"
I have created a javascript application: "Universal Windows"
我正在尝试执行该功能说你好世界。应用程序正在启动,但没有显示警告框?
I am trying to execute the function to say Hello World. The application is starting, but no alert box is shown?
我在Localhost上运行应用程序。
I run the application on Localhost.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>App1</title>
<link href="css/default.css" rel="stylesheet" />
</head>
<body onload="myFunction()">
<div>Content goes here!</div>
<script src="js/main.js"></script>
<script>
function myFunction() {
alert("Hello World!");
}
</script>
</body>
</html>
推荐答案
您的代码在我的浏览器中有效:)
You code works in my browser :)
这篇关于我的第一个javascript应用程序。你好世界警报框没有显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文