单项选择题
A.function changeImage() {myImage.src = "image2.png"; }
B.function changeImage() { document.getElementById("myImage").src = "image2.png"; }
C.function changeImage() { getElementById("myImage").src = "image2.png"; }
D.function changeImage() { window.getElementById("myImage").src = "image2.png"; }
单项选择题 You create a Web page that contains drop-down menus that are defined by using div tags in the following code. You need to write a JavaScript function that will enable the drop-down menus to activate when the user positions the mouse over the menu title. Which code segment should you use?()
单项选择题 YouareimplementingaWebpagethatdisplaystextthatwastypedbyauser.YouneedtodisplaytheuserinputintheWebpagesothatacross-sitescriptingattackwillbeprevented.Whatshouldyoudo?()
单项选择题 YouaredevelopingaWebpage.Theusertypesacreditcardnumberintoaninputcontrolnamedccandclicksabuttonnamedsubmit.Thesubmitbuttonsendsthecreditcardnumbertotheserver.AJavaScriptlibraryincludesaCheckCreditCardfunctionthatreturnsavalueoftrueifthecreditcardappearstobevalid,basedonitschecksum.Youneedtoensurethattheformcannotbeusedtosubmitinvalidcreditcardnumberstotheserver.Whatshouldyoudo?()