1 / 16

Pemrograman Javascript

Pemrograman Javascript. Teknik Informatika Universitas Bunda Mulia Jakarta Chandra Hermawan H., M.Kom ., MM. Objek dalam Javascript ?. Javascript merupakan bahasa pemrograman berorientasi objek . Sebuah objek tersusun atas properti , metode , dan penanganan kejadian (event). Properti.

yoko-lawson
Download Presentation

Pemrograman Javascript

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PemrogramanJavascript TeknikInformatika Universitas Bunda Mulia Jakarta Chandra Hermawan H., M.Kom., MM.

  2. ObjekdalamJavascript? Javascriptmerupakanbahasapemrogramanberorientasiobjek. Sebuahobjektersusunatasproperti, metode, danpenanganankejadian (event).

  3. Properti Untukmengaksessebuahproperti, menggunakan syntax sbb: Nama_objek.nama_properti Sebuahpropertidapatdiberinilai, melaluibentuksbb: Nama_objek.nama_properti = nilai Contoh: window.defaultStatus = “SelamatDatang…”

  4. Metode Metodeadalahkumpulankode yang digunakanuntukmelakukansesuatutindakanterhadapobjek. Cara penggunaanmetodemenyerupaiproperti, namunmetodetidakdapatmenyimpanmasukkan (nilai) Contoh: document.write (‘SelamatDatang…’);

  5. Event Event adalahsekumpulankode yang akandijalankanmanakalapemakaimelakukansuatutindakan. Contohnya, padasaatkitamenggerakan mouse, padasaatkitamengklik mouse, dsb. Beberapa event dalamJavascript: • OnMouseOver • OnMouseOut • OnClick

  6. Objek Built In BeberapaobjeksudahdikenalolehJavascripttanpakitamembuatnya: • document • window • location • form • navigator • date • math

  7. AritmatikaJavascript Menggunakanobjek math

  8. ContohPenggunaanaritmatika

  9. SoalLatihan 20 cm Buatlah script yang menghitungluasdaribidangdibawahini: 10 cm 10 cm 12 cm 25 cm

  10. Operator Logika • Menggunakanfungsi AND, OR, dan NOT • AND diwakilidengansintak“&&” • OR diwakilidengansintak“||” • NOT diwakilidengansintak“!”

  11. Operator Relasional

  12. Operator Unary & Assignment

  13. Soallatihan

  14. THANK YOU

More Related