Exercise One - Fill in the Blank
The Code
function show_new_object() {
// create a paragraph to be the alert message
var myAlert = document.createElement("p");
myAlert.setAttribute('id','mess2');
// change the color & make it bold
myAlert.style.color='#AF3D5C';
myAlert.style.fontWeight='bold';
// include some text
var msg = document.createTextNode("Please provide a valid email address.");
myAlert.appendChild(msg);
// place the alert on the page
window.myparent = \
document.getElementById("place4alert");
window.myparent.appendChild(myAlert);
}
The Answer Choices
- myAlert.setAttribute(‘role’,’application’);
- Sorry, this site uses Canvas.
- remove aria-live=”polite”,
- myAlert.setAttribute(‘role’, ‘alert’);
- change aria-live=”polite” to aria-live=”assertive”
- document.getElementById("ShowButton").focus();
- document.focus();
- Hello World!
- remove <h3>Timer</h3>
- document.getElementById("StayButton").focus();
- myAlert.setAttribute(‘role’, ‘slider’);