+ 3

How can i write an html code to add marks then average using <h1> tag?

24th Mar 2019, 8:30 AM
kim qim
kim qim - avatar
6 ответов
+ 12
Try doing this: <h1 id="h1" > </h1> <script> var a = Number(prompt()), b = Number(prompt()), c = Number(prompt()); document.getElementById("h1").innerHTML = Number((a+b+c)/3) </script>
24th Mar 2019, 8:38 AM
VEDANG
VEDANG - avatar
+ 10
JS is needed for this...
24th Mar 2019, 8:32 AM
ヽ(^。^)ノ✨ヽ(^。^)ノ
ヽ(^。^)ノ✨ヽ(^。^)ノ - avatar
+ 4
Displaying a html code using JS works like this: <div id="output"></div> <script> document.getElementById("output").innerHTML = "<h1>TEXT</h1>"; </script>
24th Mar 2019, 8:40 AM
Jan Štěch
Jan Štěch - avatar
+ 1
Thank you
24th Mar 2019, 8:39 AM
kim qim
kim qim - avatar
+ 1
Thank you
24th Mar 2019, 8:41 AM
kim qim
kim qim - avatar
0
write java script program having five marks compute its total and average and display them in a web page using <h1> tag.
14th Nov 2022, 5:55 AM
Peter karanu
Peter karanu - avatar