0

Link to JavaScript external sheet isn't working🤔

I'm following exercises in my book and I l had it until I had to link to JavaScript ..HTML is looking blank when I open it on chrome .I'm stuck 🤔😔 can someone look at my code See what I'm doing wrong..and what do I add the JavaScript page ..I'm confused again to what I add in HTML and JavaScript... I created a variable name my heading ="this is my web page!" Then other variable names with values of em(below). Place the variable definitions into single var statement ..Other step after is write value of each variable back to HTML document . my heading begineffect sometext When I try to link I write this .. <script type ="text/javaScript src="prj3_2.js" ></script> No idea what I'm doing wrong

30th Jul 2020, 12:35 AM
Millie Potash
Millie Potash - avatar
3 ответов
+ 3
You can't have whitespace in the name of your variables. Change variable names like 'my heading' to something more like 'my_heading' or 'myHeading' (all without the quotes, of course). Other than this make sure your file structure is correct. For the src js in this script tag to load the way it is, it will need to be in the same directory as the html file it is written in. Edit: yes also what Morty stated.
30th Jul 2020, 1:00 AM
ChaoticDawg
ChaoticDawg - avatar
+ 3
Closing quotation marks of Type attribute are missing.
30th Jul 2020, 1:00 AM
Javier Ballesteros
Javier Ballesteros - avatar
0
If you are runing project in sololearn app js page is bydefault linked. If you are using other editor and morty's idea not working Check that you both the files are in same folder.
30th Jul 2020, 4:39 AM
Divya Mohan
Divya Mohan - avatar