Visualizzazione risultati 1 fino 5 di 5

Discussione: a qualcuno che sa javascript.

  1. #1
    Guest

    Predefinito

    Grazie di aver cancellato il post... vabbè nn importa....
    qualcuno di voi sa dirmi dove nn funziona questo codice javascript?

    <HTML>
    <HEAD>

    <TITLE>Esempi Javascript: esempio pratico </TITLE>

    <SCRIPT LANGUAGE="JavaScript">


    <!-- Activate Cloaking Device

    //************************************************** *************

    //

    // Determining Screen Resolution III

    // (requires JavaScript1.2)

    //

    // by Tim Wallace (timothy@essex1.com)

    //

    //************************************************** *************



    // Used to display the browser name/version if JavaScript1.2 is not supported

    var browser=navigator.appName + " " + navigator.appVersion;



    // Though set in the JS1.2 code, these variables are declared here to avoid errors in lesser browsers

    var width=null;

    var height=null;

    var right_browser=false;



    // Called by Requirements button

    function aboutScheme()

    {

    alert("\nThis example uses screen.height & screen.width to grab the screen resolution.\n\nThese were introduced in JavaScript1.2.");

    }



    // Called by View Source button - displays text file of source.

    function viewSource()

    {

    alert("\nA text file with source will be loaded to the full window.\n\nUse your browser BACK button to return to the examples.");

    top.window.location.href="js-wid3.txt";

    }



    // Deactivate Cloaking -->


    </SCRIPT>





    <SCRIPT LANGUAGE="JavaScript1.2">


    <!-- Activate Cloaking Device



    // Used to indicate that JS1.2 is supported

    right_browser=true;



    // Grabs screen resolution

    width = screen.width;

    height = screen.height;



    // Deactivate Cloaking -->


    </SCRIPT>

    </HEAD>

    <BODY bgcolor="white">

    <SCRIPT LANGUAGE="JavaScript">

    <!-- Activate Cloaking Device



    // If browser supports JS1.2

    if(right_browser)

    {

    document.open();

    document.write("<CENTER><FONT SIZE='+1'><B>La risoluzione del tuo video e'<BR>");

    document.write(width + " x " + height);

    if(width=800)
    {
    document.write("<img src=".........">ecc.....")
    }
    else
    {
    document.write("...........")
    }

    document.write("</B></FONT></CENTER>");

    }



    // If browser does not support JS1.2 - display browser name/version & message

    else

    {

    document.open();

    document.write("<CENTER>");

    document.write("<FONT SIZE='+1'><B>"+browser+"</B></FONT><BR><BR>");

    document.write("<FONT SIZE='+1'><B>does not support JavaScript1.2.</B></FONT></CENTER>");

    }

    // Deactivate Cloaking -->

    </SCRIPT>


    </body>
    </html>

  2. #2
    Guest

    Predefinito

    prova:

    [code:1:4972a90370]
    <HTML>
    <HEAD>

    <TITLE>Esempi Javascript: esempio pratico </TITLE>

    <SCRIPT LANGUAGE="JavaScript">


    <!-- Activate Cloaking Device

    //************************************************** *************

    //

    // Determining Screen Resolution III

    // (requires JavaScript1.2)

    //

    // by Tim Wallace (timothy@essex1.com)

    //

    //************************************************** *************



    // Used to display the browser name/version if JavaScript1.2 is not supported

    var browser=navigator.appName + " " + navigator.appVersion;



    // Though set in the JS1.2 code, these variables are declared here to avoid errors in lesser browsers

    var width=null;

    var height=null;

    var right_browser=false;



    // Called by Requirements button

    function aboutScheme()

    {

    alert("\nThis example uses screen.height & screen.width to grab the screen resolution.\n\nThese were introduced in JavaScript1.2.");

    }



    // Called by View Source button - displays text file of source.

    function viewSource()

    {

    alert("\nA text file with source will be loaded to the full window.\n\nUse your browser BACK button to return to the examples.");

    top.window.location.href="js-wid3.txt";

    }



    // Deactivate Cloaking -->


    </SCRIPT>





    <SCRIPT LANGUAGE="JavaScript1.2">


    <!-- Activate Cloaking Device



    // Used to indicate that JS1.2 is supported

    right_browser=true;



    // Grabs screen resolution

    width = screen.width;

    height = screen.height;



    // Deactivate Cloaking -->


    </SCRIPT>

    </HEAD>

    <BODY bgcolor="white">

    <SCRIPT LANGUAGE="JavaScript">

    <!-- Activate Cloaking Device



    // If browser supports JS1.2

    if(right_browser)

    {

    document.open();

    document.write("<CENTER><FONT SIZE='+1'><B>La risoluzione del tuo video e'<BR>");

    document.write(width + " x " + height);

    if(width=800)
    {
    document.write("<img src=".........">ecc.....")
    }
    else
    {
    document.write("...........")
    }
    document.write("</B></FONT></CENTER>");

    }



    // If browser does not support JS1.2 - display browser name/version & message

    else

    {

    document.open();

    document.write("<CENTER>") ;

    document.write("<FONT SIZE='+1'><B>"+browser+"</B></FONT><BR><BR>");

    document.write("<FONT SIZE='+1'><B>does not support JavaScript1.2.</B></FONT></CENTER>");

    }

    // Deactivate Cloaking -->

    </SCRIPT>
    </head>

    <body>




    </body>
    </html>
    [/code:1:4972a90370]

  3. #3
    Guest

    Predefinito

    grazie

  4. #4
    Guest

    Predefinito

    funziona?

  5. #5
    Guest

    Predefinito

    non so se funziona grazie cmq..... mi sono studiato javascript in 4 ore e mi sono fatto lo script se vuoi te lo faccio vedere... per curiosità personale

Regole di scrittura

  • Non puoi creare nuove discussioni
  • Non puoi rispondere ai messaggi
  • Non puoi inserire allegati.
  • Non puoi modificare i tuoi messaggi
  •