User Profile

Collapse

Profile Sidebar

Collapse
dennischikwayi
dennischikwayi
Last Activity: Mar 22 '11, 08:25 AM
Joined: Aug 14 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • dennischikwayi
    replied to Simple JS/AJAX
    for u to get the color use the code below

    shld put values in the options and use the code belo

    var color = document.getEle mentById('selec t').options[document.getEle mentById('selec t').selectedInd ex].value;

    alternatively if u had passed the select object u would use

    document.obj.op tions[obj.selectedInd ex].value but u as well had to put values in the options...
    See more | Go to post

    Leave a comment:


  • dennischikwayi
    replied to Printing Prime numbers
    in Java
    Try this code

    for(int pp=2;pp<100;pp+ +) //pp=possible prime
    {
    for(int pd=2;pd<pp;pd++ ) //pd=possible divisor
    {
    if(pp%pd==0)
    break;
    }
    if(pp==pd)
    System.out.prin tln(pp);
    }
    u may declare out of the for loops...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...