+ 1
I am a beginner And i just tried the given example, i wrote something wrong and not getting the output could anyone help me out
<Html> <head> <title>my try</title> <body> <string type="text/javasceipt"> alert("This page cannot be dispalyed!"); </string> </head> </body> </html>
26 Respostas
+ 2
its script not string
and fix javascript typo
+ 4
First html tag is not written in Capital letter <html>
And it's <script> tag...not <string> tag
+ 3
in your code its written javasceipt, it should be javascript
+ 3
Your head and body tags are wrongly placed.
+ 1
<!DOCTYPE html>
<html>
<head>
<title>my try</title>
<body>
<script type="text/javascript">
alert("This page cannot be dispalyed!");
</script>
</head>
</body>
</html>
+ 1
Try this::
<!DOCTYPE html>
<html>
<head>
<title>my try</title>
<head>
<body>
<script type="text/javascript">
alert("This page cannot be dispalyed!");
</script>
</body>
</html>
0
How to fix javascript typo.. Can u xplain wid example
0
Ok thank yu
0
did you get an error "This page cannot be displayed!" ?
because thats the entire program, show a pop up box with "This page cannot be displayed!" written on it.
0
No it's showing some syntax error.. Line :1
0
put <!DOCTYPE html> at the very top
and change Html to html.
0
Now it showa
Uncaught synatax error:unexpected token <line :1
0
put the code here, let us see
0
nothing is wrong, i already tested it.
try to change your editor or browser
0
Ok... It isn't working in js but gives the out put when tried in html and css
0
Yeah I fixed it... Bt still the same error... Doesn't show output in js
0
Nope.. Not working
Actually am typing it in JS so is there anything else to be added
0
And jst a doubt to knw, why do we use <!DOCTYPE html> tag for?
0
doctype will let the browser know which html version you're using. html means you're using html5
you cant type html in js. they're seperated for a reason, only put html in html tab, css in css tab, and js in js tab.
0
Your extension is .html ? right Or .js?