+ 8
Discuss Module 7 Quiz 1/6 Fill in the blanks to change the content of all paragraph tags of the page to "SoloLearn". var arr =
28 Respuestas
+ 12
var arr = document.getElementsByTagName("p");
for(var x=0; x<arr.length; x++){
arr[x].innerHTML="SoloLearn";
}
+ 5
<script>
var d = document.getElementById
("p2 ");
d.style.color ="red";
</script>
+ 2
var arr = document.getElementsByTagName("p");
for(var x=0; x<arr.length; x++) {
arr[x].innerHTML="SoloLearn";
}
+ 1
<script>
var d = document.
getElementById ("p2 ");
d.style .color ="red";
</script>
+ 1
fill in the blanks to alert a massage when the button is clicked.
ANSWER:-
<button onclick ="func()"> Click Here </button> _msg() { alert("Hi!"); } </script >
ANSWER:-
onclick
function
+ 1
document.
p
x
0
<script>
var d = document.
getElementById ("p2 ");
d.style .color ="red";
</script>
0
<script>
var d = document.getElementById
("p2 ");
d.style.color ="red";
</script>
0
var arr = document.getElementsByTagName("p");
for(var x=0; x<arr.length; x++){
arr[x].innerHTML="SoloLearn";
}
0
var arr = document.getElementsByTagName("p");
for(var x=0; x<arr.length; x++){
arr[x].innerHTML="SoloLearn";
}
0
var arr = document.
getElementsByTagName("p
");
for(var x=0; x<arr.length; x++)
{
arr[x].innerHTML="SoloLearn";
}
0
script>
var d = document.
getElementById("p2");
d.style.color="red";
</script>
0
darg and drop from the options below to change the color of the paragraph with id="p2" to red.
ANSWER:-
<script> var d = document.getElementById ("p2 "); d.style.color ="red"; </script>
0
Drag and drop from the options below to change the color of the paragraph with id="p2" to red.
<script>
var d = document.
getElementById("p2");
d.style.color="red";
</script>
0
Fill in the blanks to change the content of the paragraphs with id="demo" to "<b>Hi</b>" maintaining the HTML markup.
$(function() {
$("#demo").html("<b>Hi</b>");
});
0
Dom & Events
Selecting Elements
Fill in the blanks to select the element with id="text" and change its content to "Hi".
var ob = document.getElementById("text");
ob.innerHTML= "Hi";
0
Fill in the blanks to select all <p> elements, that are children of the element with
id="demo".
$
("#demo p")
0
var arr =
document
.
getElementsByTagName("
p
");
for(var x=0; x<arr.length; x++)
{
arr[
x
].innerHTML="SoloLearn";
}
0
document
p
x
0
var arr = document.getElementsByTagName("p");
for(var x=0; x<arr.length; x++){
arr[x].innerHTML="SoloLearn";
}