You create an ASP.NET page. The page uses the jQuery $.ajax function to make calls back to the server in several places. You add the following div element to the page.
You need to implement a single error handler that will add error information from all page $.ajax calls to the div named errorInfo. What should you do?()
A.Add the following options to each $.ajax function call:
B.Add the following code to the $(document).ready function on the page:
C.Add the following option to each $.ajax function call:
D.Add the following code to the $(document).ready function on the page:
您可能感兴趣的试卷
你可能感兴趣的试题
You are implementing an ASP.NET AJAX page. You add the following control to the page.
You need update the contents of the UpdatePanel without causing a full reload of the page. Which two actions should you perform?()
A.Add the following control before the UpdatePanel.
B.Add the following control within the UpdatePanel.
C.Add an AsyncPostBackTrigger that references Timer1.
D.Add a PostBackTrigger that references Timer1.
You create a Web page that contains the following code.
You need to ensure that when the user clicks an item in the list, the text color of the "Welcome!" message will change. Which declaration should you use?()
A.<ul id="color"> <li onclick="changeColor(this.innerText);">Black</li> <li onclick="changeColor(this.innerText);">Red</li> </ul>
B.<ul id="color"> <li onclick="changeColor(this.style.color);">Black</li> <li onclick="changeColor(this.style.color);">Red</li> </ul>
C.<ul id="color"> <li><a onfocus="changeColor(this.innerText);">Red</a></li> <li><a onfocus="changeColor(this.innerText);">Black</a></li> </ul>
D.<ul id="color"> <li><a onfocus="changeColor(this.innerText);">Red</a></li> <li><a onfocus="changeColor(this.innerText);">Black</a></li> </ul>
You create a Web page that contains the following code.
You need to provide the following implementation. Each time the AddFile button is clicked, a new div element is created. The new div element is appended after the other file upload div elements and before the AddFile span. Each new element has a unique identifier. Which code segment should you use?()
A.$("#AddFile").click(function () {var id = "File" + ++lastId; var item =$(".File:first").clone(true); $("input:file", item).attr({ id: id, name: id }); item.insertBefore("#AddFile"); });
B.$("#AddFile").click(function () {var id = "File" + ++lastId;$(".File:first").clone(true).attr({ id: id, name: id }).insertBefore("#AddFile"); });
C.$("#AddFile").click(function () {var id = "File" + ++lastId; });
D.$("#AddFile").click(function () {var id = "File" + ++lastId;var item = $(".File:first").clone(true); $("input:file", item).attr({ id: id, name: id }); item.insertAfter("input[type=file]"); });
A.$(imageurls).each(function(i,url){ $("", url).append("#target"); });
B.$(imageurls).each(function(i,url){ $("#target") += $("").attr("src", url); });
C.$.each(imageurls, function(i,url){ $("").attr("src", url).appendTo("#target"); });
D.$.each(imageurls, function(i,url){$("#target").append("").src = url; });
A Web page includes the HTML shown in the following code segment.
You need to write a JavaScript function that will dynamically format in boldface all of the hyperlinks in the ref span.Which code segment should you use?()
A.$("#ref").filter("a[href]").bold();
B.$("ref").filter("a").css("bold");
C.$("a").css({fontWeight:"bold"});
D.$("#ref a[href]").css({fontWeight:"bold"});
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.
最新试题
You create an ASP.NET server control in the SampleControl namespace. The control uses a JavaScript file names Refresh.js to implement AJAX functionality.You need to ensre that the JavaScript file is included in the assembly. Which two actions should you perform?()
A library called contosobuisness.dll has been created and u need to accept it in a page.. all options had the <%assembly tag but the att differed.()
You are developing an ASP.NET Web application. The application must pass an object that contains user-specific data between multiple pages. The object ismore than 100 KB in size when serialized.You need to minimize the amount of data is sent to the user.What should you do?()
In a page there is a div (I guess it was a div) and you need to execute a javascript function when if first moves the mouse over the element.()
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 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?()
You have a login.ascx control and to display it in a view which method u would use()
You are perfoming security testing on an existing asp.net web page.You notice that you are able to issue unauthorised postback requests to the page. You need to prevent unauthorised post back requests. which page directive you use?()
Which method of the Page class searches the page naming container for a server control with a particular identifer?()
Which class provides paging functionality for data-bound controls that implement the IPageableItemContainer interface?()