News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

Advertisement

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;
<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?

  1. $("#AddFile").click(function () {
    var id = "File" + ++lastId;
    var item = $(".File:first").clone(true); $("input:file", item).attr({ id: id, name: id }); item.insertBefore("#AddFile"); });
  2. $("#AddFile").click(function () {
    var id = "File" + ++lastId;
    $(".File:first").clone(true) .attr({ id: id, name: id }) .insertBefore("#AddFile"); });
  3. $("#AddFile").click(function () {
    var id = "File" + ++lastId;
    });
  4. $("#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]");
    });
Answer: Answer is a
comments powered by Disqus
Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;