1.
You are developing a web page that consumes a Windows Communication Foundation (WCF) service. The page includes the following code segment. var xhr = new XMLHttpRequest() ; The page uses the xhrHandler() method to listen for changes to the request status of the WCF service calls. It uses the xmlToJavaScript() method to convert the response from the WCF service to a JavaScript object. The xhrHandler() method must be called automatically each time the request status changes. You need to add the event handler to the request object. Which line of code should you use?
2.
You are developing an application that consumes an external web service that returns the latest stock rate. The application has two methods: The getResults() method makes an AJAX web service request The ShowRate() method displays the stock rate from the web service response You need to ensure that the ShowRate() method always displays the latest stock rate. Which code segment should you use?
3.
You are creating a JavaScript function to display the current version of a web application You declare a button as follows. You need to create an event handler for the button by using an anonymous function. Which code segment should you use?
4.
You are creating a page that contains detailed employee information for a company portal. The page uses a jQuery library. The page contains a button named btnEdit that is defined by the following code. The button is displayed by default. The button must be hidden only if the user is logged off. You need to add code to the document.ready() function to meet the requirements for the button. Which line of code should you use?
5.
You are testing the value of the following variable in JavaScript. var height = "300"; A block of code must execute if the following conditions are true: The height variable is set to 300 The height variable is of type string You need to implement the code to run the test. Which line of code should you use?
6.
You are modifying a blog site to improve search engine readability. You need to group relevant page content together to maximize search engine readability. Which tag should you use?