\r\nWill someone elaborate this to me","answerCount":4,"upvoteCount":1,"suggestedAnswer":[{"@type":"Answer","text":"Obviously 20/2 results in 10 on first click ,on second click 10/2 results in 5","upvoteCount":3},{"@type":"Answer","text":"function substrNumbrs(first, second)\r\n{\r\n var result = first - second;\r\n \r\n \r\n \r\n result;\r\n}\r\ndocument.write(substrNumbrs(10, 5)); \r\ncan you fun would before return","upvoteCount":0},{"@type":"Answer","text":"What will be the content of the paragraph after the user clicks on it twice?\r\n

20

\r\n\r\n\r\n_________________________\r\n\r\nANSWER 5","upvoteCount":0}]} }
+ 1

What will be the content of the paragraph after the user clicks on it twice?

HTML : <p id='txt' onclick='test();'>20</p> JS : <script> function test() { var x=document.getElementById('txt'); var n = x.innerHTML; x.innerHTML = n/2; } </script> Will someone elaborate this to me

13th Jun 2020, 12:35 PM
Lekant T. Shiwankar
Lekant T. Shiwankar - avatar
4 Antworten
+ 3
Obviously 20/2 results in 10 on first click ,on second click 10/2 results in 5
13th Jun 2020, 12:38 PM
Abhay
Abhay - avatar
0
function substrNumbrs(first, second) { var result = first - second; result; } document.write(substrNumbrs(10, 5)); can you fun would before return
17th Jun 2020, 9:38 AM
yaswanth
yaswanth - avatar
0
What will be the content of the paragraph after the user clicks on it twice? <p id='txt' onclick='test();'>20</p> <script> function test() { var x=document.getElementById('txt'); var n = x.innerHTML; x.innerHTML = n/2; } </script> _________________________ ANSWER 5
2nd Jul 2020, 7:35 PM
Rustamjon Kosimov
Rustamjon Kosimov - avatar