, and the script for doing the same at title is like this:- <html> <head> <title>Showing time at title</title> <script"> , and the script for doing the same at title is like this:- <html> <head> <title>Showing time at title</title> <script"> , and the script for doing the same at title is like this:- <html> <head> <title>Showing time at title</title> <script" />

HTML mazmunini Javascript bilan sozlash

I would like to echo a clock inside a <div id="details">, and the script for doing the same at title is like this:-

<html>
<head>
<title>Showing time at title</title>
<script language="javascript">
function showTimes(){
 myDate= new Date()
 realTimes= "Time now " + myDate.getHours() + " : "
 realTimes= realTimes + myDate.getMinutes() + " : "
 realTimes= realTimes + myDate.getSeconds() + "."
 realTimes= realTimes + myDate.getMilliseconds()
 document.title=realTimes
 setTimeout("showTimes()",100)
}
</script>
</head>
<body onLoad="showTimes()">

</body>
</html>

how shall I rewrite the script?? Thanksalot...

0

3 javoblar

o'zgartiring

document.title=realTimes

bilan

document.getElementById("details").innerHTML=realTimes
0
qo'shib qo'ydi

Siz document.getElementById ("tafsilotlar") ni o'rnatmoqchisiz. InnerHTML .

0
qo'shib qo'ydi
ishlamoqda! katta rahmat!!
qo'shib qo'ydi muallif Ham, manba

O'zgartirish

document.title=realTimes` 

bilan

document.getElementById('details').innerHTML=realTimes

hiyla qilar edi

0
qo'shib qo'ydi
Javascript UZB
Javascript UZB
99 ishtirokchilar

@js_uzb @vuejs_uz @react_uz @nodejs_uz @angular_uz @ngTashkent @yiiframework_uz @laravel_uz @linux_uzbek @python_uz @swift_uzb —————— @uzdevgroup @UzGeeksGroup ——— @UzDev_Jobs @jobs_uzb

PhP |BotsUz
PhP |BotsUz
93 ishtirokchilar

Phpni o'rganishni Hohlasangiz https://t.me/joinchat/AAAAAE-KRc5dd5tPMmGmWA A'zo bo'lin