Click here to Skip to main content
15,891,607 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: Question of a dusy_dex Pin
Hakan Bulut13-Apr-13 23:43
Hakan Bulut13-Apr-13 23:43 
GeneralRe: Question of a dusy_dex Pin
dusty_dex14-Apr-13 0:11
dusty_dex14-Apr-13 0:11 
GeneralRe: Question of a dusy_dex Pin
Hakan Bulut15-Apr-13 4:18
Hakan Bulut15-Apr-13 4:18 
GeneralRe: Question of a dusy_dex Pin
dusty_dex15-Apr-13 7:09
dusty_dex15-Apr-13 7:09 
GeneralRe: Question of a dusy_dex Pin
dusty_dex14-Apr-13 23:54
dusty_dex14-Apr-13 23:54 
GeneralRe: Question of a dusy_dex Pin
Hakan Bulut15-Apr-13 21:23
Hakan Bulut15-Apr-13 21:23 
GeneralRe: Question of a dusy_dex Pin
dusty_dex15-Apr-13 23:16
dusty_dex15-Apr-13 23:16 
GeneralRe: Question of a dusy_dex Pin
Hakan Bulut16-Apr-13 2:42
Hakan Bulut16-Apr-13 2:42 
C#
// add this after the line } // while-loop
document.write(arr.toString());
//instead of arr[add++] method is better useful in this line.


I have just wanted to do this.
C#
var arrIns  = [ "1","21","24","28","42","48",
                "12","23","34","36","37","46",
                "3","18","19","25","44","45"  ];

var arrLot  = [];
var arr     = [];
var add     = 0;

for(var i=1; i<50; i++)
{
    arrLot[i] = i;
    if(arrLot[i] != arrIns[0])
    if(arrLot[i] != arrIns[1])
    if(arrLot[i] != arrIns[2])
    if(arrLot[i] != arrIns[3])
    if(arrLot[i] != arrIns[4])
    if(arrLot[i] != arrIns[5])
    if(arrLot[i] != arrIns[6])
    if(arrLot[i] != arrIns[7])
    if(arrLot[i] != arrIns[8])
    if(arrLot[i] != arrIns[9])
    if(arrLot[i] != arrIns[10])
    if(arrLot[i] != arrIns[11])
    if(arrLot[i] != arrIns[12])
    if(arrLot[i] != arrIns[13])
    if(arrLot[i] != arrIns[14])
    if(arrLot[i] != arrIns[15])
    if(arrLot[i] != arrIns[16])
    if(arrLot[i] != arrIns[17])
    if(arrLot[i] != arrIns[18])
    if(arrLot[i] != arrIns[19])
        { arr[add++] = arrLot[i];}
}

// create and initialise - array to keep track of any number taken
    var taken = new Array(49);
    for (var i=49; i>0; i--) taken[i]=false;

    var lucky = [];
    var z     = 0;

    do{
        var q = Math.round(31 * Math.random());
        if(!taken[arr[q]]) {
            lucky[z] = arr[q];
            taken[arr[q]] = true;
            document.write(lucky[z] + "  ");
            z++;
        }
    }while(z<6);


modified 16-Apr-13 8:52am.

GeneralRe: Question of a dusy_dex Pin
dusty_dex16-Apr-13 6:35
dusty_dex16-Apr-13 6:35 
GeneralRe: Question of a dusy_dex Pin
Hakan Bulut17-Apr-13 1:57
Hakan Bulut17-Apr-13 1:57 
GeneralRe: Question of a dusy_dex Pin
dusty_dex17-Apr-13 4:56
dusty_dex17-Apr-13 4:56 
GeneralRe: Question of a dusy_dex Pin
dusty_dex15-Apr-13 23:41
dusty_dex15-Apr-13 23:41 
GeneralRe: Question of a dusy_dex Pin
Hakan Bulut16-Apr-13 2:05
Hakan Bulut16-Apr-13 2:05 
GeneralRe: Question of a dusy_dex Pin
dusty_dex16-Apr-13 2:15
dusty_dex16-Apr-13 2:15 
GeneralRe: Question of a dusy_dex Pin
dusty_dex16-Apr-13 9:37
dusty_dex16-Apr-13 9:37 
GeneralRe: Question of a dusy_dex Pin
dusty_dex16-Apr-13 10:53
dusty_dex16-Apr-13 10:53 
GeneralRe: Question of a dusy_dex Pin
Hakan Bulut16-Apr-13 21:18
Hakan Bulut16-Apr-13 21:18 
QuestionJavaScript controls with date and time (format: dd / mm / yyyy hh: mm: ss) Thank you, and provide the connection site Pin
Jandren10-Apr-13 16:59
Jandren10-Apr-13 16:59 
AnswerRe: JavaScript controls with date and time (format: dd / mm / yyyy hh: mm: ss) Thank you, and provide the connection site Pin
enhzflep10-Apr-13 18:36
enhzflep10-Apr-13 18:36 
QuestionHow can I submit form without the querystring Pin
jsampathkumar10-Apr-13 7:22
professionaljsampathkumar10-Apr-13 7:22 
AnswerRe: How can I submit form without the querystring Pin
Graham Breach10-Apr-13 7:55
Graham Breach10-Apr-13 7:55 
AnswerRe: How can I submit form without the querystring Pin
Sandeep Mewara10-Apr-13 8:16
mveSandeep Mewara10-Apr-13 8:16 
QuestionIE(10) has problems with SELECT.onchange Pin
captnmac8-Apr-13 7:22
captnmac8-Apr-13 7:22 
AnswerRe: IE(10) has problems with SELECT.onchange Pin
enhzflep10-Apr-13 9:19
enhzflep10-Apr-13 9:19 
GeneralRe: IE(10) has problems with SELECT.onchange Pin
captnmac11-Apr-13 1:54
captnmac11-Apr-13 1:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.