Professional Documents
Culture Documents
PERMBLEDHJA
PERMBLEDHJA
- <hr> -> percakton nje vije horizontale mes paragrafeve apo fjalive
-<em>..</em> -> to emphasis ,e ben shkrimin te pjerret .. vendos para dhe pas nje fjale
-<meta> -> eshte Brenda head te faqes dhe permban info per te gjithe faqen.Nuk duket nga perdoruesi por jep te dhena mbi
faqen prsh kush e ka krijuar,eshte apo jo I prekur nga koha etj.Atributet e tij: description,keywords etj . Metadata zakonisht
perkufizion titullin e dokumentit,bashkesine e karaktereve,stilet,linket,script dhe info te tjera meta
-Taget per HEAD: <title>, <style>, <meta>, <link>, <script>, and <base>.
1.Per nje faqe : <a href=http://www.fshn.edu.al target=_blank>Vizitoni FSHN! </a> (** _blank tregon qe linku do
-FONT->tipi shkrimit
- Tabelat : <table>
<th> -> koka e nje tabele,emrat e nje kolone ose rreshti pra del me bold sesa elementet poshte
** <th></th> ->nqs duam nje qelize bosh (keshtu behet dhe per tr e td ns I duam bosh)
<td> -> nje qelize te tabeles * duhet te jene brenda nje <tr> *(mbushja e tab me elemente)
<caption> -> percakton nje caption t tabeles,emer I tabeles qe nuk perfshihet Brenda ne tabele
<col> -> percakton vlerat attribute te nje apo disa kolonave ne tabele
<table border= 1 >-> per te percaktuar kufijt se nese nuk vihet ska vija mes kolonave dhe rreshtave
<table border=1 cellpadding=4> ->percakton hapesira bosh mes permbajtjes dhekufijve(hapesira nga te
4 anet dmth qe e rrethon)
<table border=1 cellspacing=3> ->percakton hapesiren boshe mes qelizave(si tabelet n word qe jane
vetem vizat pa hapesira fare)
-Lista : <ol> -> percakton nj liste te renditur( ka tipe t ndryshme si prsh <ol type=a> // <ol type=A >// <ol type =I>
<ul> ->percakton nj liste jo te renditur ( ka 3 tipe <ul type=disc> // <ul type=circle// <ul type=square> )-bullets
A.Planets
I.Silicon Crust
a.Earth
<ol type=A>
**Atributet e inputit:
3.LISTA :: <select name=pozicioni > </select>-> percakton nje list ku mund te perzgjidhet
4. GRUPIMI I EL SI CV :: <form>
Hapi 1:<fieldset> ->perdoret per te grupuar elemente qe kane lidhje me njeri tjt ne nje forme
Hapi 2: <legend> CV </legend>
Hapi 3: </fieldset> </form>
<p style=text-decoration:underline>
<p style=text-transform:uppercase>
<p style="font-size:50px">This is a paragraph.</p>
1. <body>
<div class=qyteti></div>
-Audio:
-Video:
-Atributet HTML:
Attribute Description
alt Specifikon nje text alternative per nje imazh kur imazhi nuk shfaqet
-HTML5:
semantic elements like <header>, <footer>, <article>, and <section>.
o Examples of non-semantic elements: <div> and <span> - Tells nothing about its content.
o Examples of semantic elements: <form>, <table>, and <article> - Clearly defines its content.
attributes of form elements like number, date, time, calendar, and range.
graphic elements: <svg> and <canvas>.
document.getElementBy(id)
-PRSH : <body>
<p id="demo"></p>
<script>
</script>
</body>
<body>
<button type="button"
onclick="document.getElementById('demo').innerHTML = Date()">
<p id="demo"></p>
</body>
<!DOCTYPE html>
<html>
<body>
<script>
function myFunction() {
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<script>
function light(sw) {
var pic;
if (sw == 0) {
pic = "pic_bulboff.gif"
} else {
pic = "pic_bulbon.gif"
document.getElementById('myImage').src = pic;
</script>
<p>
</p>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<script>
document.getElementById("demo").style.fontSize = "40px";
</script>
</body>
</html>
-HTML SVG
-SVG has several methods for drawing paths, boxes, circles, text, and graphic images.
-SVG Shapes
SVG has some predefined shape elements that can be used by developers:
Rectangle <rect>
Circle <circle>
Ellipse <ellipse>
Line <line>
Polyline <polyline>
Polygon <polygon>
Path <path>
Code explanation:
The cx and cy attributes define the x and y coordinates of the center of the circle. If cx and cy are omitted, the circle's
center is set to (0,0)
The r attribute defines the radius of the circle
<!DOCTYPE html>
<html>
<body>
</svg>
</body>
</html>
Code explanation:
The width and height attributes of the <rect> element define the height and the width of the rectangle
The style attribute is used to define CSS properties for the rectangle
The CSS fill property defines the fill color of the rectangle
The CSS stroke-width property defines the width of the border of the rectangle
The CSS stroke property defines the color of the border of the rectangle
<!DOCTYPE html>
<html>
<body>
</svg>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<script>
function myFunction() {
alert("Page is loaded");
</script>
</head>
<body onload="myFunction()">
<h1>Hello World!</h1>
</body>
</html>
2-onclick ( shtyp butonin dhe posht saj shfaqet teksti hello world )
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<p>A function is triggered when the button is clicked. The function outputs some text in a p element with id="demo".</p>
<script>
function myFunction() {
</script>
</body>
</html>
3-onmousedown ose onmouseup( kur je mbi tekst ndryshon ngjyra,kur heq mousin ka ngjyr tjt
<!DOCTYPE html>
<html>
<body>
Click the text! The mouseDown() function is triggered when the mouse button is pressed down over this paragraph. The
function sets the color of the text to red. The mouseUp() function is triggered when the mouse button is released. The
mouseUp() function sets the color of the text to green.
</p>
<script>
function mouseDown() {
document.getElementById("p1").style.color = "red";
function mouseUp() {
document.getElementById("p1").style.color = "green";
</script>
</body>
</html>
4-onmouseover dhe onmouseout (kur ke mousin siper imazhin ndryshon madhesi,kur e heq behet si eshte)
<!DOCTYPE html>
<html>
<body>
<p>The function bigImg() is triggered when the user mouse over the image. This function enlarges the image.</p>
<p>The function normalImg() is triggered when the mouse pointer is moved out of the image. That function sets the height
and width of the image back to normal.</p>
<script>
function bigImg(x) {
x.style.height = "64px";
x.style.width = "64px";
function normalImg(x) {
x.style.height = "32px";
x.style.width = "32px";
</script>
</body>
</html>
2.USHTRIME SHKOLLE
<html>
<head>
</head>
<body>
<tr>
<th width="40%">Emer</th>
<th width="40%">Mbiemer</th>
<th width="20%">Nota</th>
</tr>
<tr>
<td width="20%">8</td>
</tr>
</table>
</body>
</html>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2-
<html>
<head>
</head>
<body>
<tr>
<th>Emer </th>
<th>Mbiemer </th>
</tr>
<tr>
<td> 8 </td>
</tr>
</table>
</body>
</html>
3-
1
Telefon
2
<html>
<head>
</head>
<body>
<tr >
<td>1</td>
</tr>
<tr rowspan="2">
<td> 2 </td>
</tr>
</table>
</body>
</html>
4-
FSHN
Emer Mbiemer Nota
Daniela Muhaj 10
Anxhela Lupo 8
SM
Lenda:
ADB
<html>
<head>
</head>
<body>
<tr>
</tr>
<tr >
<td>Emer</td>
<td>Mbiemer</td>
<td>Nota</td>
</tr>
<tr>
<td> 10 </td>
</tr>
<td colspan="2"> Anxhela Lupo </td>
<td> 8 </td>
</tr>
<tr>
<td> SM </td>
</tr>
<tr>
</tr>
</table>
</body>
</html>
5- Krijo nje form si me poshte ku Gjinia te jete ne tipin radio, Grupi te jete ne formen e listes dhe Lenda te dali e plotesuar,Cv
te jete ne pdf , Foto te jete ne jpg dhe me pas te kete nje checkbox ku do te pranohen ose jo te dhenat e mesiperme dhe nje
koment.Ne fund submit ose kliko
<body>
<form>
Emer:
Mbiemer:
Gjinia:
Grupi:
<select name="Grupi">
</select> </br>
Lenda:
<datalist id="Lenda">
<option value="SM">
<option value="ADB">
</datalist> </br>
CV:
Foto:
Dakord:
Koment:
</form>
</body>
6-
<html>
<head>
<body>
<table border="1">
<tr>
</tr>
<tr>
</tr>
7-
<html>
<head>
<title>Forms</title>
</head>
<body>
<fieldset>
<legend>Your Details:</legend>
</fieldset><br />
<fieldset>
<legend>Your Review:</legend>
<p>
<option value="google">Google</option>
<option value="friend">Friend</option>
<option value="advert">Advert</option>
<option value="other">Other</option>
</select>
</p>
<p>
</p>
<p>
</p>
<label><input type="checkbox" name="subscribe" checked="checked" /> Sign me up for email updates</label><br />
</fieldset>
</form>
</body>
</html>
8-Nderto tabelen
CSS
1.CSS NGA LIBRI
a. Class
Shkruhet si nje folder tjt ne nje editor teksti gjithe kodi CSS dhe e lidh me kryesorin me ane te
Margin < head > <link rel=stylesheet text =text/css href=stili.css /> </head>
Kufiri
3.Fleta e stilit e brendshme ( Brenda tagut <head>)
-Sintaksa:
***Nqs vlera eshte me shume se nje fjale vendoset ne thonjeza prsh : body:{ font family :sans serif}
-Padding :
<head>
<style>
p{
padding: 30px;
</style>
</head>
-Margin :
<head>
<style>
p{
margin: 50px;
</style>
</head>
-Cilesite e sfondit
Background-image: url("images/pattern.gif");
-Cilesite e tekstit:
Color
Direction
Line-height
Letter-spacing
Text-align
Text-decoration : underline/none;
Text-transform :uppercase/lowerspace
Font
Font-size : 40px/50%;
Font-stretch
Font-style : normal/italic
-Cilesite e border:
Border color
Border-bottom(-color,-width,-style)
Border width
Border style
Border top
-Cilesite e Kontureve:
Outline
Outline-color
Outline-style
Outline-width
Margin
Margin-bottom
Margin-left
Margin-right
Margin-top
-Cilesite e dimensionit
Height
Line-height
Max-height(min)---gjatesia
Max-width(min)--- gjeresia
-Cilesite e pozicionimit
Bottom
Clip
Left
Position
Right
Top
Vertical-line
1)Klasat (.)
2)ID(#)
Prsh : <head>
<style>
#test1{
Color:red;}
.test2{
Color:green;}
<body>
</body>
a:hover -> mouse mbi link ( vjen mbas a:link dhe a:visited)
<a class= ekuqe href=css_syntax.asp>CSS </a> = pra ns ky link eshte vizituar ai do te shfaqet me
te kuqe
2) Nje stilizim per 1 paragraf I cili ne momentin qe kalon anash paragrafit,permasat,paragrafet te shkojne
20 px ndersa fonti arial
Zgjidhje
Max_height: 20px;
Max_width:20px;
Font_family:arial;
{
2.USHTRIME SHKOLLE
1-Te krijohet 1 faqe html e cila ka nje tabele,1 imazh dhe nje paragraph.Te krijohet klasa CSS per imazhin e cila ka keto
attribute max width dhe max height eshte 100 px,pozicioni ne qender.Per tabelen,te krijohet nje ID e cila ka keto
attribute,border 1 px solid black.Madhesia e tab te jete 100%,wordspace 5px ndersa per paragrafin te krijohet mundesia qe ne
hover te jete tipi I shkrimit arial dhe madhesia e shkrimit 14 px
Zgjidhje
<html>
<head>
<style type="text.txt">
.imazhi1{
max_width:100px;
max_height:100px;
position:center;
#tab{
width:100%;
word-spacing:5px;
p:hover {
font_size:14px;
font_family:arial;
</style></head>
<body>
<table id="tab">
<tr>
<td> 1 </td>
<td> 2 </td>
</tr>
</table>
</body>
</html>
2-Ndertoni nje faqe HTML qe ka nje buton ne mes te faqes,ngjyra e background te jete blu dhe shkrimi I butonit kliko te jete I
bardhe.Ne momentin qe mousi vendoset mbi buton,background te behet I bardhe dhe shkrimi I butonit te behet I zi.
Zgjidhje
<!doctype html>
<html>
<head>
<style>
body {
background-color: lightblue;
.button{
position:center;
color:white;
.button:hover{
background-color:white;
color:black;
</style>
</head>
<body>
</body>
</html>
JAVASCRIPT
PJESA E PARE: USHTRIME NGA LIBRI
<!doctype html>
<html>
<head>
<script>
Function funksionim(){
</script> </head>
<body>
<p id=Demo > Permbajtja e paragrafit kur faqja ngarkohet dhe funksioni javascript nuk eshte ekzekutuar akoma .</p>
</body>
</html>
<!doctype html>
<html>
<head>
<script>
function funksionim(){
X= document.getElementById(demo);
</script>
<body>
<p id=Demo > Permbajtja e paragrafit kur faqja ngarkohet dhe funksioni javascript nuk eshte ekzekutuar akoma .</p>
</html>
<!doctype html>
<html>
<body>
<p> Klikoni butonin dhe do te keni nje pershendetje bazuar n kohe. </p>
<script>
Function koha(){
Var x= ;
Document.getElementById(demo).innerHTML=x;
If(koha<20){
X=Miredita;}
Else {
X=Mirembrema; }
4-Kutia alert
<!doctype html>
<html>
<head> </head>
<body>
<script>
Function shfaq_alert(){
<!doctype html>
<html>
<head>
<script>
Function shfaq_konfirmim(){
If(r==true){
Else{
</script>
</head>
<body>
</body>
</html>
6-Kutia prompt ( kjo kuti perdoret zakonisht ns duam q perdoruesi te fuse nje vlere perpara hyrjes n faqe)
<!doctype html>
<html>
<head>
<script>
Function shfaq_prompt(){
1.CILESI
2.METODE
HTML DOM
Eshte standarti per aksesimin e elementeve html.DOM eshte nje nderfaqe e pavarur nga gjuha dhe platforma e cila jeon
programet dhe skriptet te hyjne dhe te perditesojne ne menyre dinamike permbajtjen,strukturen dhe stilin e nje dokumenti.
1-get Element By Id
<!doctype html>
<html>
<body>
<script>
X=document.getElementById(intro);
</script>
</body>
</html>
<!doctype html>
<html>
<body>
<div id=kryesore>
</div>
<script>
Var x=document.getElementById(kryesore);
Var y=x.getElementsByTagName(p);
</script>
</body> </html>
3-get Elements By Class Name
<!doctype html>
<html>
<body>
<div id=kryesore>
</div>
<script>
Var x=document.getElementById(Kryesore);
Var y=x.getElementsByClassName(paragraph);
</script>
</body>
</html>
<!doctype html>
<html>
<body>
<script>
</script>
</body>
</html>
5-ndryshimi I permbajtjes se titullit kryesor
<!doctype html>
<html>
<body>
<script>
Var element=document.getElementById(header);
</script>
</body>
</html>
6-ndryshimi I atributit
<!doctype html>
<html>
<body>
<script>
Function ndrysho() {
Document.getElementById(imazh).src=foto.jpg;
</script>
<p> Imazhi original ishte Daniela.jpg,por skripti e ndryshoi ate ne foto.jpg </p>
</body>
</html>
<!doctype html>
<html>
<body>
</body>
</html>
<!doctype html>
<html>
<body>
<script>
Document.getElementById(p2).style.color=blue;
Document.getElementById(p2).style.fontFamily=arial;
Document.getElementById(p2).style.fontSize=larger;
</script>
<p> Paragrafi I dyte ne radhe eshte ndryshuar nga nje script </p>
</body>
</html>
9-Ngjarja OnClick
<!doctype html>
<html>
<head>
<script>
Function ndryshimteksti(id){
Id.innerHTML=oops!;
</script>
</head>
<body>
</body>
</html>
10.Ngjarja onLoad
<!doctype html>
<html>
<head>
<script>
Window.onload=shfaq_prompt;
Function shfaq_prompt(){
</script>
</head>
<body>
</body>
</html>
JAVASCRIPT
PJESA E DYTE: PERMBLEDHJA NGA TUTORIALE
1- JS mund te ndryshoje :
a. HTML CONTENT -> document.getElementById(demo).innerHTML=Hello! ;
b. HTML ATRIBUTET ->document.getElementById(myimage).src=fotoendryshuar.jpg ;
c. HTML STILET -> document.getElementById(demo).style.fontSize=25px;
2- JS Head
<!DOCTYPE html>
<html>
<head>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Paragraph changed.";
}
</script>
</head>
<body>
<h1>A Web Page</h1>
<p id="demo">A Paragraph</p>
<button type="button" onclick="myFunction()">Try it</button>
</body>
</html>
3- JS Body
<!DOCTYPE html>
<html>
<body>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Paragraph changed.";
}
</script>
</body>
</html>
4- JS I jashtem
<!DOCTYPE html>
<html>
<body>
<h2>External JavaScript</h2>
<script src="myScript.js"></script>
</body>
</html>
PRSH :
-Krijimi I Objektit
EVENTET
-Eventet jane gjerat qe I ndodhin elementeve te HTML
-Nje event HTML mund te jete dicka qe faqja e internetit ben ose dicka qe perdoruesi ben.
-Disa shembuj te eventeve te HTML : 1) Nje faqe HTML qe ka mbaruar se ngarkuari(load)
2) nje fushe inputi ka ndryshuar
3)nje buton klikohet
-Zakonisht,kur nje event ndodh,ti do duash qe te besh dicka.Javascript te ndihmon ty te ekz nje kod nuk eventet
ndodhin.HTML lejon atributet e atyre qe merrren me eventet,me Kodin e JS, qe te shtohen tek elementet e HTML.
<!DOCTYPE html>
<html>
<body>
<button onclick="document.getElementById('demo').innerHTML=Date()">The time is?</button>
<p id="demo"></p>
</body>
</html>
IF..ELSE
SHEMBULLI 1: KLIKO BUTONIN QE TE GJEJ PERSHENDETJEN E DUHUR NE BAZE TE ORES
ZGJIDHJE
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
function myFunction() {
var greeting;
var time = new Date().getHours();
if (time < 10) {
greeting = "Good morning";
} else if (time < 20) {
greeting = "Good day";
} else {
greeting = "Good evening";
}
document.getElementById("demo").innerHTML = greeting;
}
</script>
</body>
</html>
FOR
SHEMBULLI 2
JS FORM VALIDATION
SHEMBULLI 1: SHKRUAJ NJE NR NGA 1 DERI TEK 10
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Can Validate Input</h2>
<p>Please input a number between 1 and 10:</p>
<input id="numb">
<button type="button" onclick="myFunction()">Submit</button>
<p id="demo"></p>
<script>
function myFunction() {
var x, text;
// Get the value of the input field with id="numb"
x = document.getElementById("numb").value;
// If x is Not a Number or less than one or greater than 10
if ( x < 1 || x > 10) {
text = "Input not valid";
} else {
text = "Input OK";
}
document.getElementById("demo").innerHTML = text;
}
</script>
</body>
</html>
JAVASCRIPT DOM
1.Si te ndryshojme permbajtjen e nje elementi HTML
HTML DOM eshte nje model objekt standart dhe nje nderfaqe programuese e HTML.Jep:
document.getElementById(id)
document.getElementsByTagName(name)
document.getElementsByClassName(name)
Ndryshimi I elementeve HTML
1. Element.innerHTLM = new html content
2. Element.attribute = new value (Atribute si name,length etj)
3. Element.setAttribute(attribute,value)
4. Element.style.property=new style (property si color,fontSize,fontColor)
Shtimi dhe fshirja e elementeve
1. document.createElement(element)
2. document.removeChild(element)
3. document.appendChild(element) shtimi
4. document.replaceChild(element)
5. document.write(text) te shkruash n nj output HTML
Gjetja e elementeve te HTML
1.By id
2. By tag name
3.by class name
4.by css selectors
5.Nga koleksioni I objekteve HTML
Shembulli 1: BY ID
Shembulli 2: BY TAG NAME
Pa div
Me div
DOM ANIMIMET
SHEMBULLI 1 : NE KLIKIM TE BUTONI KATRORI LEVIZ NGA FILLIMI QE ISHTE NE PIK E FUNDIT FARE
<!DOCTYPE html>
<html>
<style>
#container {
width: 400px;
height: 400px;
position: relative;
background: yellow;
}
#animate {
width: 50px;
height: 50px;
position: absolute;
background-color: red;
</style>
<body>
<p>
</p>
<div id ="container">
<div id ="animate"></div>
</div>
<script>
function myMove() {
var pos = 0;
function frame() {
if (pos == 350) {
clearInterval(id);
} else {
pos++;
}}
}</script></body></html>
DOM EVENTET
SHEMBULLI 1 : KUR KLIKON MBI NJE FUSHE NDRYSHON NGJYRA E BACKGROUNDIT TE ASAJ FUSHE
HTML/DOM manipulation
CSS manipulation
HTML event methods
Effects and animations
AJAX
Utilities
Google CDN:
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
Examples:
$(this).hide() - hides the current element.
$("p").hide() - hides all <p> elements.
$(".test").hide() - hides all elements with class="test".
$("#test").hide() - hides the element with id="test".
JQUERY SELECTORS
-SELEKTUESI I NJ ELEMENTI : You can select all <p> elements on a page like this: $("p")
JQUERY EVENTS
[Ps : edhe per double klik eshte njesoj vetem qe sintaksa eshte : $(p).dblclick(function(){ ]
JQUERY ANIMATION
SINTAKSA:
$(selector).animate({params},speed,callback);
We will take an example to understand the process of validation. Here is a simple form in html
format.
<html>
<head>
<title>Form Validation</title>
<script type="text/javascript">
<!-// Form validation code will come here.
//-->
</script>
</head>
<body>
<form action="/cgi-bin/test.cgi" name="myForm" onsubmit="return(validate());">
<table cellspacing="2" cellpadding="2" border="1">
<tr>
<td align="right">Name</td>
<td><input type="text" name="Name" /></td>
</tr>
<tr>
<td align="right">EMail</td>
<td><input type="text" name="EMail" /></td>
</tr>
<tr>
<td align="right">Zip Code</td>
<td><input type="text" name="Zip" /></td>
</tr>
<tr>
<td align="right">Country</td>
<td>
<select name="Country">
<option value="-1" selected>[choose yours]</option>
<option value="1">USA</option>
<option value="2">UK</option>
<option value="3">INDIA</option>
</select>
</td>
</tr>
<tr>
<td align="right"></td>
<td><input type="submit" value="Submit" /></td> </tr></table></form</body></html>
SHEMBUJ JAVASCRIPT
1- JS HTML DOM - CSS Manipulation
SHEMBULLI 1: KUR CON MOUSIN LART MBI KATROR,NDRYSHON NGJYRA E BACKGROUNDIT TE FAQES NE BAZE TE
NGJYRES SE KATRORIT
<!DOCTYPE html>
<html>
<head>
<script>
function bgChange(bg) {
document.body.style.background = bg;
</script>
</head>
<body>
<table style="width:300px;height:100px">
<tr>
<td onmouseover="bgChange(this.style.backgroundColor)"
onmouseout="bgChange('transparent')"
style="background-color:Khaki">
</td>
<td onmouseover="bgChange(this.style.backgroundColor)"
onmouseout="bgChange('transparent')"
style="background-color:PaleGreen">
</td>
<td onmouseover="bgChange(this.style.backgroundColor)"
onmouseout="bgChange('transparent')"
style="background-color:Silver">
</td>
</tr>
</table></body></html>
2- JS HTML INPUT
<!DOCTYPE html>
<html>
<body>
<form>
</form>
<button onclick="disableElement()">Disable</button>
<script>
function disableElement() {
document.getElementById("btn01").disabled = true;
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
</form>
<p>Click "Try it" to display the value of each element in the form.</p>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("frm1");
var i;
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
table, td {
</style>
</head>
<body>
<p>Click the button to add a new row at the first position of the table and then add cells and content.</p>
<table id="myTable">
<tr>
<td>Row1 cell1</td>
<td>Row1 cell2</td>
</tr>
<tr>
<td>Row2 cell1</td>
<td>Row2 cell2</td>
</tr>
<tr>
<td>Row3 cell1</td>
<td>Row3 cell2</td>
</tr>
</table>
<br>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
table, td {
</style>
</head>
<body>
<p>Click the buttons to create and delete row(s) for the table.</p>
<table id="myTable">
<tr>
<td>Row1 cell1</td>
<td>Row1 cell2</td>
</tr>
<tr>
<td>Row2 cell1</td>
<td>Row2 cell2</td>
</tr>
<tr>
<td>Row3 cell1</td>
<td>Row3 cell2</td>
</tr>
</table>
<br>
<script>
function myDeleteFunction() {
document.getElementById("myTable").deleteRow(0);
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
<td>80</td>
</tr>
</table>
<p>
onclick="document.getElementById('myTable').deleteRow(2)">
</p>
</body></html>
4-JS HTML DOM Events
SHEMBULLI 1: ONFOCUS KUR KLIKON NE KUTINE E DHENE NDRYSHON NGJYRA E BACKGROUNDIT ** KUJDES!! (THIS) QE
PO KERKOJE
SHEMBULLI 2: ONSUBMIT -> KUR JE DUKE SHKRUAR,PLOTESOHET EMRI DHE NE KLIKIM TE BUTONIT,NXJERR NJE TABELE
ALERT
SHEMBULLI 3 ON MOUSE DOWN ON MOUSE UP KUR KLIKON MBI TEKST NDRYSHOHET NGJYRA