+ 1

How the language will be structured to get the following answer: (a) ab (b) a

What is the output of this code if the HTML code is <p>a<span>b</span></p>? $(function() { $("p span").text("a"); }); How the language will be structured to get the following answer: (a) ab (b) a

22nd Dec 2018, 2:28 AM
kp kalia
kp kalia - avatar
4 Respostas
+ 3
answer is aa bcs the span tag will be changed text a and there is already present a in the p tag so that ans is aa
27th Jun 2020, 3:56 AM
Seema R. Kuhikar
Seema R. Kuhikar - avatar
+ 1
Shouldn't it be 'aa'?
22nd Dec 2018, 3:14 AM
Шащи Ранжан
Шащи Ранжан - avatar
+ 1
It is aa
27th Mar 2020, 6:56 PM
Sushmita Pyne
Sushmita Pyne - avatar
0
What is the output of this code if the HTML code is <p>a<span>b</span></p>? $(function() { $("p span").text("a"); -> [span will be changed text a and there is already present a in the p tag ] }); Answer: aa
1st Oct 2022, 4:22 AM
amala koothan
amala koothan - avatar