01-14-2012, 03:22 AM
Please help me to solve this assignment as soon as possible. Thanking in anticipation..........
|
CS101 Assignment#4( help required plz)
|
|
01-14-2012, 03:22 AM
Please help me to solve this assignment as soon as possible. Thanking in anticipation..........
01-14-2012, 03:51 AM
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("multiplication 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(button);
}
window.onload = multi;
</script>
</head>
<body>
<div id="table"></div>
</body>0300-9520262 Get solution in 24 hour |cpmputer & internet mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
01-15-2012, 12:37 AM
plz send me 4 assingment of cs201.
01-15-2012, 05:42 AM
you can check the code of html provided by vuhelper
01-15-2012, 05:56 PM
but sir i need solution of cs201 assignment no 4 plz help me
|
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| Need ACC501 - Business Finance Assignment No 2 Solution. | Umar Abbas | 2 | 4,249 |
02-07-2014, 08:23 PM Last Post: Umar Abbas |
|
| sta301 assignment 4 27 jun | bc110200090 | 6 | 3,573 |
01-26-2013, 02:05 AM Last Post: Vuhelper |
|
| cs506 2nd assignment | millee | 0 | 2,656 |
12-04-2012, 11:30 PM Last Post: millee |
|
| cs506 2nd Assignment | Neelam Ahmad | 5 | 3,123 |
12-04-2012, 11:24 PM Last Post: Vuhelper |
|
| CS 504 Assignment 2 need help | ommmi | 24 | 11,415 |
11-27-2012, 04:59 AM Last Post: Xpert |
|
| Mcs cs402 1st assignment | chahat4all | 2 | 3,765 |
11-01-2012, 11:11 PM Last Post: chahat4all |
|
| eng201 assignment 4 due date 4/7/2012 | bc110200090 | 6 | 2,615 |
07-03-2012, 03:51 PM Last Post: bc110200090 |
|
| RequiRed syllabus for LLB of BZU | murshad.raza | 2 | 4,986 |
06-26-2012, 11:02 PM Last Post: Vuhelper |
|
| need CS304 4th assignment | shazma | 0 | 2,053 |
06-26-2012, 12:48 PM Last Post: shazma |
|
| sta301 assignment 4 solution | vudecent | 0 | 2,393 |
06-25-2012, 01:51 AM Last Post: vudecent |
|