javascript - How do I make local js files work? -
on local testing out stuff i've built.
this script trying include in file in same folder:
<script src="/colorpicker/js/evol.colorpicker.min.js" type="text/javascript" charset="utf-8"></script>
the colorpicker on desktop in folder called work/demo/
the colorpicker not working. make work on local?
there number of things (but xmlhttprequest) can done using javascript blocked file:///
uris security reasons in browsers. in general, development purposes, recommend installing web server (either directly on workstation or in virtual machine) , using testing.
that said, if want test without web server, don't use root relative uris. i.e. not start uris /
character hit top of file system, not top directory consider part of site.
Comments
Post a Comment