menu
Qammunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
You want to add the same functionality to various web sites you have created for your school district without having to add the script to each html page. where should you place your javascript code to
asked
Dec 27, 2018
212k
views
1
vote
You want to add the same functionality to various web sites you have created for your school district without having to add the script to each html page. where should you place your javascript code to accomplish this in the most efficient manner
Computers and Technology
high-school
Parampal Pooni
asked
by
Parampal Pooni
8.9k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
6
votes
You should place your javascript in a separate file and name it appropriately, e.g. script.js.
Then you should call for your script using the HTML:
<script src="script.js" type="text/javascript"
></script>
Wuno
answered
Dec 31, 2018
by
Wuno
8.1k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Dec 3, 2024
122k
views
Adding multiple events in an array of elements using 'querySelectorALL' in JavaScript? In my HTML, i already have three Divs. In my script section, this is my code: for (var i = 0; i < box.length; i++) { box[i].addEventListener("mouseover", function () { box.style.backgroundColor = "blue"; }); } box.addEventListener("mouseout", function () { box[i].style.backgroundColor = "pink"; }); Ok so based on that code snippet, am trying to add a mouseover and mouseout events in each element so that when I hover on and off each div they change color. But it doesn't seem to work. Any advice on how I can make this work?
Dima Ti
asked
Dec 3, 2024
by
Dima Ti
7.8k
points
Computers and Technology
college
2
answers
2
votes
122k
views
asked
Nov 8, 2019
210k
views
What is a valid value of the type attribute used in the script tag of HTML code? A: "Text" B: "Javascript" C: "Text/Javascript" D: "Text-Javascript" This is very hard, and I would so so so appreciate it,
Emanuela Colta
asked
Nov 8, 2019
by
Emanuela Colta
8.6k
points
Computers and Technology
college
2
answers
3
votes
210k
views
asked
Aug 23, 2020
42.1k
views
The _____ attribute tells a browser to parse the HTML and JavaScript code together, only pausing to process the script before returning to the HTML file.
Piko
asked
Aug 23, 2020
by
Piko
8.1k
points
Computers and Technology
high-school
1
answer
2
votes
42.1k
views
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.4m
questions
12.2m
answers
Other Questions
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to put it in my own words because my English is not that good!
describe an advance in technology that makes life more enjoyable. what discoveries contribute to this technology?
Disadvantages of using animation in advertising? advantages and disadvantages of using animation for education? advantages and disadvantages of using animation in entertainment?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qammunity.org