联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp2

您当前位置:首页 >> CS作业CS作业

日期:2020-09-27 10:38

First

A. Create a HTML document that shows a Pokédex for the first 20 Pokémon.

a. Images and description for 20 Pokémon available.

b. Use an unordered list to display each item and use CSS to visually group each

item (e.g. boundary or a fill colour) without the typical bullet in a list.

c. Credit source material with links at the bottom of the page (see References

section).

B. Display two search boxes at the top of the page. One to search for Pokémon by number

and the other to search by name.

C. Use JavaScript to validate input for the two search boxes. Box 1 should only accept

numbers 1-20. Box 2 should only accept A-Z or a-z and no more than 20 characters.

D. “Enter” key or the “Search” button on each box should display a pop-up message with

names and descriptions of all matches (up to 5).

E. Ensure that all CSS and JavaScript are in separate files.

Second

F. Using JavaScript, modify the DOM of this page so that:

a. Create a new content block (e.g. DIV) above the first Pokémon.

b. Create a new list (any list) inside this block and add list elements for each of the

search results. Each list element must have all the information that is present in

the full list. E.g. image, description etc.

c. Dynamically update this list as the user is typing new characters or deleting

characters in the search box. E.g. when the user deletes all the characters, the

new content block should disappear.

d. Style the new content block to be visually distinct from the full list.

G. Using pure JavaScript without using any external library.

Workflow

1. Use JavaScript to pick an element using document.getElementById() or

document.querySelector() method, creating new elements and content using

.createElement() or .createTextNode() method and then adding the newly created

elements to the selected node using appendChild() method.

2. Do not use the .innerHTML() method to create content.


版权所有:留学生编程辅导网 2018 All Rights Reserved 联系方式:QQ:99515681 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。