Jump to content

anson920520

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About anson920520

  • Rank
    Newbie
  1. Thanks for help,but let's said this, i have my table which wrote in javascript document.write('<table>');//Creates Tabledocument.write('<table>');//for loop that creates the row, increments from 0 to 9 each time it reiteratesfor (var row=0; row<9; row++) { document.write('<tr>'); //a nested for loop that reiterates 9 times creating the <td>'s and then exits to the parent for loop. for (var col=0; col<9; col++) { document.write('<td id="r', row, 'c', col, '"oncontextmenu="handleRightClick(this); return false;">'); document.write('<
  2. I want to change something in a table when i click on it,so i create a onclick function,but i notice if i have a fucntion like this: <html><head><script type="text/javascript">function handleRightClick(){document.getElementById("test").innerHTML="123123";}</script</head><body><table id="test" oncontextmenu="handleRightClick(this); return false;"><tr><td>A</td></tr><tr><td>B</td></tr><tr><td>C</td></tr></body></html> when i click on it, it will change everything,how can
  3. I am currently working on a minesweeper game function about calculate adjacent mines,i have done the fully code now, but i might some error inside itso when i open up the page, there's no number came out.My target is when i open up a browser and there will be ten mines withnumber around it can someone tell me what i should correct? this is the code to lay 10 random mines,it working good: Code: function addmines () { var mine = 9; var mineNumber = 0; var n = 10; //number of mines while (n>0) { var row = Math.floor(Math.random()*9); var col = Math.floor(Math.random()*9); var id = "r" +
  4. I currently need to finish a task for my project which needs me to create a Create a display component to show Select pet shop name and total Pets in that shop. For this tasks i created a several components,I had a function call "getPetsInPetShop" to do what i mention public static ArrayList<Pet> getPetsInPetShop(Petshop petshopName) { // this should go through all pets and return only those whose // pet shop name is the same as the parameter... //new arrylist to store information about pets ArrayList<Pet> result = new ArrayList<Pet>(); //loop thought the csv f
×
×
  • Create New...