Which code segment should you use?
You create a Web page that contains the following code.
<script type=”text/javascript”>
var lastId = 0;
</script>
<div class=”File”>
Choose a file to upload:
<input id=”File0″ name=”File0″ type=”file” />
</div>
<input id=”AddFile” type=”button” value=”Add a File” />
<input id=”Submit” type=”submit” value=”Upload” />
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?
Which code segment should you use?
You create a Web page that contains the following div.
<div id=”target”>
</div>
You have a JavaScript array named imageurls that contains a list of image URLs.
You need to write a JavaScript function that will insert images from the URLs into target.
Which code segment should you use?
Which code segment should you use?
A Web page includes the HTML shown in the following code segment.
<span id=”ref”>
<a name=Reference>Check out</a> the FAQ on <a href=”http://www.contoso.com”>Contoso</a>’s web site for more information: <a href=”http://www.contoso.com/faq”>FAQ</a>.
</span>
<a href=”http://www.contoso.com/home”>Home</a>
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?
Which code segment should you use?
You create a Web page that contains the following image element.
<img id=”myImage” src=”/image1.png” />
You need to write a JavaScript function that will dynamically change which image is displayed.
Which code segment should you use?
Which two actions should you perform?
You are implementing an ASP.NET application that makes extensive use of JavaScript libraries.
Not all pages use all scripts, and some scripts depend on other scripts.
When these libraries load sequentially, some of your pages load too slowly.
You need to use the ASP.NET Ajax Library Script Loader to load these scripts in parallel.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Which code segment should you use?
You create a Web page that contains drop-down menus that are defined by using div tags in the following code.
<div class=”dropdown-menu”>
<div class=”menu-title”>Menu One</div>
<div class=”menu-items” style=”display:none;”>
<div><a href=”#”>Item One</a></div>
<div><a href=”#”>Item Two</a></div>
</div>
</div>
<div class=”dropdown-menu”>
<div class=”menu-title”>Menu Two</div>
<div class=”menu-items” style=”display:none;”>
<div><a href=”#”>Item Three</a></div>
<div><a href=”#”>Item Four</a></div>
</div>
</div>
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?
What should you do?
You are implementing a Web page that displays text that was typed by a user.
You need to display the user input in the Web page so that a cross-site scripting attack will be prevented.
What should you do?
What should you do?
You create a Web page that has an ASP.NET menu.
You need to ensure that the menu items are populated from an array of strings in your code-behind file.
What should you do?
What should you do?
You are dynamically adding controls to an ASP.NET page in the Page_Load event handler.
The page will have text boxes that correspond to the columns in a database table.
Each text box will be preceded by a label that displays the name of the corresponding column.
You need to create the form so that when the user clicks the label, the corresponding text box is selected for input.
What should you do?
What should you do?
You are implementing a Web page that allows users to upload files to a Web server.
The page includes a form that has a Submit button.
You want to restrict uploads so that only files smaller than 1 MB can be uploaded.
What should you do?