javascript - Error indicated at .html and pointed at .js -


i new javascrpting , newbie question.

i have index.html file looks like:

<!doctype html> <html> <head> <title>the d3 test</title> <style> .chart {  }  .main text {     font: 10px sans-serif;   }  .axis line, .axis path {     shape-rendering: crispedges;     stroke: black;     fill: none; }  circle {     fill: steelblue; }  </style> <script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script> </head> <body>    <div class='content'>       <!-- /the chart goes here -->    </div>    <script type="text/javascript" src="scatter.js"></script> </body> </html> 

note scatter.js here javascript create d3.js plot.

this code won't work , when try inspect errors using chrome , ctrl+shift+j error: enter image description here

what error , why did browser confuse .html , .js?

is scatter.js located on same folder index.html?
if not must indicate complete path instead of src="scatter.js"


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -