php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS101 Introduction to Computing Assignment No. 4 Semester Spring June 2012
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#7
Code:
<html> <head> <script type="text/javascript"> function multi() { var par_elem = document.getElementById("table"); while(par_elem.childNodes.length) { par_elem.removeChild(par_elem.childNodes[0]); } var input = 0.5; while(input < 1 || input > 12 || parseInt(input) != input) { if(input_str === null) { create_button(); return; } var error = (typeof(input_str) != "undefined") ? "Your input is not a value between 1 and 12 or is not an integer. Try again.\n" : ""; var input_str = window.prompt(error + "Enter a value between 1 and 12 (inclusive, integer only)", ""); var input = new Number(input_str); } var table = document.createElement("table"); table.style.border = "1px solid #000000"; table.style.borderCollapse = "collapse"; var hrow = document.createElement("tr"); var heading = document.createElement("td"); heading.colSpan = 5; heading.style.backgroundColor = "#C0C0C0"; heading.appendChild(document.createTextNode("multi plication table for: " + input)); hrow.appendChild(heading); table.appendChild(hrow); for(var i = 1; i < 13; i++) { var color = (i / 2 == Math.floor(i / 2)) ? "#E0E0FF" : "#F0F000"; var tr = document.createElement("tr"); var value = document.createElement("td"); value.style.backgroundColor = color; value.appendChild(document.createTextNode(i)); var times = document.createElement("td"); times.style.backgroundColor = color; times.appendChild(document.createTextNode("times") ); var inp_cell = document.createElement("td"); inp_cell.style.backgroundColor = color; inp_cell.appendChild(document.createTextNode(input )); var equals = document.createElement("td"); equals.style.backgroundColor = color; equals.appendChild(document.createTextNode("equals ")); var result = document.createElement("td"); result.style.backgroundColor = color; result.appendChild(document.createTextNode(i * input)); tr.appendChild(value); tr.appendChild(times); tr.appendChild(inp_cell); tr.appendChild(equals); tr.appendChild(result); table.appendChild(tr); } par_elem.appendChild(table); if(document.all && !window.opera) par_elem.innerHTML = par_elem.innerHTML; create_button(); } function create_button() { var ie = (document.all && !window.opera); if(ie) var button = document.createElement("<input type='button' value='new multiplication table'>"); else { var button = document.createElement("input"); button.type = "button"; button.value = "new multiplication table"; } button.onclick = multi; document.getElementById("table").appendChild(butto n); } window.onload = multi; </script> </head> <body> <div id="table"></div> </body> </html>

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Messages In This Thread
CS101 Introduction to Computing Assignment No. 4 Semester Spring June 2012 - by Vuhelper - 06-25-2012, 09:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  CS508- Modern Programming Languages Assignment No. 03 Solution January 2016 Vuhelper 0 4,645 01-20-2016, 05:43 PM
Last Post: Vuhelper
  CS401 assignment no 3 Solution 20th January 2016 Vuhelper 0 10,342 01-20-2016, 05:15 PM
Last Post: Vuhelper
  Human Computer Interaction (CS408) Assignment no 3 20th January 2016 Vuhelper 0 1,150 01-20-2016, 05:13 PM
Last Post: Vuhelper
  CS101 Introduction to Computing Assignment No.2 Solution Spring Semester 2013 Vuhelper 4 12,232 12-13-2014, 01:23 AM
Last Post: Vuhelper
  ENG101 English Comprehension Assignment No.1 Solution Spring Semester 2013 Vuhelper 3 4,724 11-25-2014, 03:35 PM
Last Post: Vuhelper
  CS201 Introduction to Programming Assignment No. 3 Solution Spring Semester June 2013 Vuhelper 1 4,159 06-24-2013, 10:39 PM
Last Post: Vuhelper
  MGT101 Financial Accounting Assignment 2 Solution Spring Semester June 2013 Vuhelper 0 3,147 06-15-2013, 11:57 PM
Last Post: Vuhelper
  ISL201 Islamic Studies Assignment No.1 Solution Spring Semester 2013 Vuhelper 0 4,637 05-17-2013, 09:33 PM
Last Post: Vuhelper
  CS201 Introduction to Programming Assignment No.2 Solution Spring Semester 2013 Vuhelper 5 6,663 05-17-2013, 02:55 AM
Last Post: Xpert
  ENG201 Assignment No.2 Solution Spring Semester 2013 Vuhelper 1 5,829 05-16-2013, 04:41 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support