You create a Web page that contains the following image element.
You need to write a JavaScript function that will dynamically change which image is displayed. Which code segment should you use?()
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?()
A.$(".dropdown-menu").hover( function () { $(".menu-items").slideDown(100); },function () { $(".menu-items").slideUp(100); } );
B.$(".dropdown-menu").hover( function () { $(".menu-items", this).slideDown(100); },function (){ $(".menu-items", this).slideUp(100); } );
C.$(".dropdown-menu").hover( function () { $(this)".slideDown(100); }, function () { $(this).slideUp(100); } );
D.$(".dropdown-menu").hover( function () { $("this.menu-title",).slideDown(100); },function () {$("this.menu-title",).slideUp(100); } );
A.Call document.write.
B.Call Response.Write.
C.Call HttpUtility.UrlEncode.
D.Call HttpUtility.HtmlEncode.
A.Configure the input control to run on the server. On the submit button, add a server-side OnClick handler that calls CheckCreditCard and rejects the form submission if the input is invalid.
B.On the input control,add an onChange handler that calls CheckCreditCard and cancels the form submission when the input is invalid.
C.Configure the input control and the submit button to run on the server. Add a submit_OnClick handler that calls CheckCreditCard and rejects the form submission if the input is invalid.
D.On the form, add an onSubmit handler that calls CheckCreditCard and cancels the form submission if the input is invalid.
A.Require developers to set EnableViewStateMac to true.
B.Store state in ControlState instead of ViewState.
C.Serialize the state into an Application state entry called "MyControl"
D.Require developers to change the session state mode to SQL Server.
A.Modify the hosting page’s caching directive as follows.
B.Add the following meta tag to the Head section of the hosting page.
C.Add the following caching directive to the hosted control.
D.Add the following caching directive to the hosted control.
A.Ini
B.Load
C.PreInit
D.PreLoad
You are implementing a read-only page that includes the following controls.
You disable view state to improve performance. You need to ensure that the page is updated to display the latest data when the user clicks the refresh button. Which code segment should you use?()
A.protected void Page_PreInit(object sender, EventArgs e) { if (!IsPostBack) { gvCustomers.DataSource = GetCustomers(); gvCustomers.DataBind(); } }
B.protected void Page_Load(object sender, EventArgs e) { gvCustomers.DataSource = GetCustomers(); gvCustomers.DataBind(); }
C.protected void gvCustomers_DataBinding(object sender, EventArgs e) { gvCustomers.DataSource = GetCustomers(); gvCustomers.DataBind(); }
D.protected void Page_PreRender(object sender, EventArgs e) { if (!IsPostBack) { gvCustomers.DataSource = GetCustomers(); gvCustomers.DataBind(); } }
A.btnAddToCart_Click
B.Page_Load
C.Page_PreRender
D.Page_PreInit
A.<asp:Label ID="lblCompany" runat="server" meta:resourcekey="lblCompany" />
B.<asp:Label ID="lblCompany" runat="server" Text="meta:lblCompany.Text" />
C.<asp:Label ID="lblCompany" runat="server" Text="<%$ Resources:lblCompanyText %>" />
D.<asp:Label ID="lblCompany" runat="server" Text="<%$ Resources:WebResources, lblCompanyText %>" />
A.the EnableEventValidation attribute
B.the ResponseEncoding attribute
C.the ValidateRequest attribute
D.the Strict attribute
最新试题
You have a master page custom.master ... u create a nested.master page using it ... and then u have content page that uses the nested.master as its master page ... to get a string prop from custom.master into a label in content page the code u wud use()
In a web page with chechboxes you need to write e jquery that retruns the number checked checkboxes.()
Which event of the GridView class occurs when the Edit button of a row is clicked, but before the GridView control enters edit mode?()
You are developing an ASP.NET MVC 2 Web Application. You need to implement an asynchronous controller named AccountingController, and you must ensure that the export action required proper authorization.Which code segment should you use?()
You are developing an ASP.NET Web application.The application is configured to use the membership and role providers. You need to allow all users to perform an HTTP GET for application resources, but you must allow only the user named Moderator to perform a POST operation.Which configuration should you add to the web.config file?()
You are developing an ASP.NET Web page that uses jQuery validation. The user should enter a valid email address in a text box that has ID txtEmail. The page must display "E-Mail address required" when the user does not enter an address and "Invalid e-mailaddress" when the user enters an address that is not formatted properly. You need to ensure that the appropriate error message is displayed when the text box does not contain a valid e-mail address. Which two code segments should you add?()
Which class defines the contract that ASP.NET implements to provide membership services using custom membership providers?()
You are developing a Asp.net web application tht includes a panel control that has ID contentsection.You need to add a textBox control to the panel control.()
The page will be posted to the server after one or more image files are selected for upload.You need to ensure that all unuploaded files are saved to the server within one call to a single event handler. What should you do? ()
You have a login.ascx control and to display it in a view which method u would use()