+ Reply to Thread
Results 1 to 1 of 1

Thread: JavaScript

  1. JavaScript

    #1
    VIP ~TraNda~'s Avatar
    Member since
    Feb 2014
    Location
    WarGods
    Posts
    12,100
    Last username
    LiOn. ~JoK3r ~
    Blog Entries
    4
    Mentioned
    95 Post(s)
    Achievements Days Registered 4 Mentions Received 2 Mentions Received 1 Mentions Given 4 Mentions Given 3 Mentions Given 2 Mentions Given 1 Threads Rating Received 1
    Doneaza
    Sustine Comunitatea WarGods!
    Fii unul de-al nostru! Doneaza
    Doneaza in Cont Bancar
    Click aici pentru a face o Donatie

    JavaScript

    JavaScript este un limbaj de programare pe partea de client (browser-ul utilizatorului). Acesta a fost prima data dezvoltat de firma Netscape sunt numele de LiveScript, dupa care ulterior a devenit JavaScript. Java este un limbaj gen software cum este si c++.

    Adaugare JavaScript in pagina Web:
    Pentru a face acest lucru ne folosim de 2 metode:
    • scriem codul in pagina web intre tagurile <script type="text/javascript"> si </script>
      Exemplu:
      HTML Code:
      You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
      Acest cod va afisa:
      Code:
      You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
    • scriem codul intr-un fisier extern pe care il introducem apoi in pagina, folosind <head>
      Exemplu:
      HTML Code:
      You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
      Acest cod va afisa:
      Code:
      You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!

    Ascunderea codului JavaScript in borwserele vechi
    Browserele vechi care nu cunosc JavaScript vor afisa codul in pagina. Pentru a impiedica acest lucru, adaugam codul intre <!-- si //-->
    Exemplu:
    HTML Code:
    You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
    Adaugarea comentariilor in codul JavaScript
    Comentariile sunt esentiale in orice limbaj de programare. Acesta ajuta la adaugarea indicatiilor care va vor ajuta sa descifrati mai repede codul in urma unei editari.
    Pentru a adauga comentariu pe o singura linie folosim // urmat de comentariul respectiv. Pentru a adauga comentariu pe mai multe linii folosim /* la īnceputul comentariului si */ la sfarsitul acestuia.

    Reguli de scriere a codului JavaScript
    • case-sensitive face diferenta intre litere mari si mici
    • punct si virgula( ; ) toate declaratiile trebuie sa se termine cu ";"
    • spatii libere JavaScript ignora spatiile libere, facand posibila asezarea mai frumoasa a codului in pagina pentru o mai usoara citire a acestuia
    • ghilimele("") acestea sunt folosite pentru a delimita sirurile
    • caractere speciale sunt necesare cānd trebuie sa afisam in pagina un caracter special sau o apasare de tasta. Pentru a face asta adaugam backslash(\) in fata caracterului respectiv
    1.\b - backspace
    2.\f - indica o pagina noua
    3.n - indica o linie noua
    4.\r - indica un return
    5.\t - indica o apasare a tastei TAB
    6.\\ - indica un caracter backslash
    7.\' - ghilimele simple
    8.\" - ghilimele duble


    Next tutorial: You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!

    TAGS
    JavaScript , Ce este Java , Introducere JavaScript , WarGods Java , Tutorial JavaScript , Ce este JavaScript , WarGods Tutorial
    Last edited by ~TraNda~; 19-01-2016 at 07:39 PM.
    -------------

    TraNda - WarGods | R.R.M - AngeL - LiOn. - pichacku - Jok3r - UnicA

    P A C E

    DISCORD: unknown.cfg


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Partners
Humble Monthly Bundle
Voucher PC-Garage