+ 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
4 ответов
+ 3
Obviously 20/2 results in 10 on first click ,on second click 10/2 results in 5
0
function substrNumbrs(first, second)
{
var result = first - second;
result;
}
document.write(substrNumbrs(10, 5));
can you fun would before return
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