简体   繁体   中英

While running this program I am not getting any response in web browser

I am new to JavaScript and while trying to run this code in Notepad++ latest version. Nothing is loading into the browser. Is this a problem with my browser or code?
How would I modify this code to get output?

This is my code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
</head>
<body> 
<script type="text/javascript">
Document.write("Hello Am Midhun");
</script>
</body>
</html>

Javascript is case sensitive. Try using a lower case 'd' in document ie. "document.write("Hello Am Midhun");"

Demo: http://jsfiddle.net/biz79/tp8hcjy7/

<script type="text/javascript">
document.write("Hello Am Midhun");
</script>

您应该使用小写字母作为document.write("Hello Am Midhun");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM