DHTML help

if someone could help me out (source code) with these problems i would appreciate it very much :)

1) Write a web page that enables the user to play the game of 15. There is a 4-by-4 board (implemented as an html table)for a total of 16 slots. One of the slots is empty. The other slots are occupied by 15 tiles, randomly numbered from 1 through 15. Any tile next to the currently empty slot can be moved into the currently empty slot by clicking on the tile. Your program should create the board with the tiles out of order. The user's goal is to arrange the tiles into sequential order row by row. Using the DHTML object model and the ONCLICK event, write a script that allows the user to swap the positions of a tile and the open position(hint: the ONCLICK event should be specified for each table cell.)

2) Write an error handler that changes the ALT text of an image to "Error Loading" if the image loading is not completed.

3) Write a function that responds to a click anywhere on the page by displaying with alert() the event name if the user held shift during the mouse click, or the name of the element that triggered the event if the user held ctrl during the mouse click.

4) Create a web page which applies the invert filter to an image if the user moves the mouse
over the image.

5) Design a web page that allows the user to choose from a series of images and allows the user to view the image in color and in grayscale.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!