Selesai

I would like to hire a Javascript Developer

Proyek ini berhasil diselesaikan oleh ainosoft dengan harga $35 USD dalam sehari.

Dapatkan penawaran gratis untuk proyek seperti ini
Pemberi kerja bekerja
Anggaran Proyek
$10 - $30 USD
Diselesaikan Dalam
1 hari
Total Penawaran
5
Deskripsi Proyek

Create 3 JavaScript functions that do the following.

a.) A function that takes in 0 arguments and returns nothing. It should write out "Fun times!" styled in red.

b.) A function that takes in 1 argument and returns nothing. The one arguments should be a message. It should write the message out in red.

c.) A function that takes in 2 arguments and returning a string. The two arguments are a message and a color. The function should return a HTML DIV with the message styled as the given color.

Call these three functions with sample arguments in your code. They should all display something to the screen

Submit a file called funtimes.html.

Write a function named genNumTable that takes in one argument, the positive number 20. The genNumTable function should return the HTML needed for a HTML table. The values inside the table cells should be numbers, starting with the number passed “20” in and decrementing by one every table cell. The rows of the table should not be larger than 6 cells long. Create blank cells by using a non-breaking space inside a table cell. EXAMPLEgenNumTable(13)would return the HTML for a table that would have its cells laid out as follows.

13 12 11 10 9 8

7 6 5 4 3 2

1

Call the function within a webpage and display the results of the function call in the web browser.

Clarifing:

PART 1 - Write the function by building a string of HTML and returning it. Call this function genNumTable1. Make sure the page displays the results of the function call.

PART 2 - Write the function by creating a DOM Node for the Table, along with its children, and returning it. Call this function genNumTable2. Make sure the table appears in the web browser.

Morfunctions.html.

Last a simple form looking like a Tic Tac Toe game.

Using a two dimensional array, write the JavaScript needed to begin a tic tac toe game. You should have two functions for this script. generateBoard() When called should create a tic tac toe board (2D array) and return it. The second function displayBoard(board) should take in as a parameter a tic tac toe board (the array created by generateBoard()) and return the HTML needed for an attractive representation for the state of the game board. The representation should have lines separating the tic tac toe cells and display xs and os where appropriate. In your web page, callgenerateBoard() to create a game board, populate the array returned with some Xs and Os and then call displayBoard and display the resulting HTML to the web browser.

You can either implement this by [url removed, login to view] HTML or by manipulating the DOM.

Submit a file called tictactoe.html.

Diselesaikan oleh:
Keahlian yang Diperlukan

Ingin menghasilkan uang?

  • Atur anggaran Anda dan jangka waktunya
  • Uraikan proposal Anda
  • Dapatkan bayaran atas pekerjaan Anda

Pekerjakan para freelancer yang juga menawar di proyek ini

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online