1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Fiesta28 [93]
3 years ago
11

Andy wants to add a script on his website that will automatically update the current date when the script loads in the browser.

Computers and Technology
1 answer:
FrozenT [24]3 years ago
8 0
The script that Andy would want to use is Javascript, here is the source code: document.getElementById("para1").innerHTML = formatAMPM();
function formatAMPM() {var d = new Date(),    minutes = d.getMinutes().toString().length == 1 ? '0'+d.getMinutes() : d.getMinutes(),    hours = d.getHours().toString().length == 1 ? '0'+d.getHours() : d.getHours(),    ampm = d.getHours() >= 12 ? 'pm' : 'am',    months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],    days = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];return days[d.getDay()]+' '+months[d.getMonth()]+' '+d.getDate()+' '+d.getFullYear()+' '+hours+':'+minutes+ampm;<span>}

The HTML code needed to call this Javascript on his website is this: </span><span><div id="para1"></div>
</span>
You could call the Javascript up using PHP.

Hope this helps! Good luck! :) 
You might be interested in
The physical address assigned each network adapter is called its ________.
zysi [14]
MAC address
....................
5 0
3 years ago
What is the python print of (“5”+”7”)?
Firdavs [7]

Answer:

57

Explanation:

Since the 5 and the 7 don't represent integers instead they represent strings so it would come out as 57 hope I helped!

4 0
3 years ago
Which option ie an example of an html end tag
Kay [80]
Any end tag in HTML needs to look like this, the word body used in this example is one of the more important elements, but you can replace it to any real element in HTML:
i.e. </body>
8 0
3 years ago
A digital footprint is .
BlackZzzverrR [31]

Your digital footprint is the trail of 'electronic breadcrumbs' you leave behind when you use the internet. It can include the websites you visit, the photos you upload and your interactions with other people on social networks.

3 0
3 years ago
Suppose you have two tables: officer and gentleman. what question(s) can be asked by using the union operator?
Alik [6]
The union of two tables is basically the total of the two tables, so "or" questions would be my guess.
8 0
2 years ago
Other questions:
  • What is the input output ratio if its 12/23
    7·1 answer
  • Suppose you are currently in the /home/hnewman/os/fall/2013 directory and would like to navigate to /home/hnewman/discreteStruct
    9·1 answer
  • The code segmentif (speed &lt;= 40)cout &lt;&lt; "Too slow";if (speed &gt; 40 &amp;&amp; speed &lt;= 55)cout &lt;&lt; "Good spee
    11·1 answer
  • What is runtime error in Python? Provide an example
    14·1 answer
  • Explain what a wiki is and list its advantages.
    5·1 answer
  • Spencer wants to choose a career path that wouldn’t hold him to an office or laboratory. Which of the following career paths wou
    13·2 answers
  • When using color in a computer - generated presentation aids you should use?
    7·1 answer
  • Each object in your database application is shown in the
    12·1 answer
  • How will you identify a file type on your computer?
    5·1 answer
  • Can someone follow my tt its c1ndy.dont.miss
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!