Answers for "js path in html"

1

force git pull overwrite

# if working with newer repos where 'master' is now 'main'
git fetch --all
git reset --hard origin/main
Posted by: Guest on December-11-2020
7

how to link javascript to html

<script src = "index.js"></script>
Posted by: Guest on May-16-2020
1

app.use public

app.use(express.static('public'))
app.use(express.static('files'))
Posted by: Guest on April-02-2020
2

use static with expres

app.use(express.static('directoryName'))
#store the files in the directory as if you were making a website without express
Posted by: Guest on August-12-2020
7

path in html

/   = Root directory
   .   = This location
   ..  = Up a directory
   ./  = Current directory
   ../ = Parent of current directory
   ../../ = Two directories backwards
Posted by: Guest on March-26-2020
0

How to add js file to a site through url

var jsFile = document.createElement("script");
jsFile.src = "homePage.js";  // it can be path also  "{themes('/scripts/homePage.js')}"
document.body.appendChild(jsFile);  //append it as src to body
Posted by: Guest on October-29-2020

Browse Popular Code Answers by Language