ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ HTML ءﺎﯿﺷﺍ ﯼﺎﻫﻪﻧﻮﻤﻧ


فهرست مطالب

    نمایش فهرست مطالب


.HTML ءﺎﯿﺷﺍ ﯼﺭﺎﮑﺘﺳﺩ ﻭ ﯽﺳﺮﺘﺳﺩ ﯼﺍﺮﺑ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ﺯﺍ ﻩﺩﺎﻔﺘﺳﺍ ﺯﺍ ﯽﯾﺎﻫ ﻪﻧﻮﻤﻧ


ﺮﮕﻨﻟ ءﯽﺷ

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ ﮏﻨﯿﻟ ﮏﯾ href ﯽﮔﮋﯾﻭ ﺭﺍﺪﻘﻣ

<!DOCTYPE html>
<html>
<body>

<p><a id="myAnchor" href="https://www.w3schools.com/">W3Schools</a></p>

<p>Click the button to display the value of the href attribute of the link above.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("myAnchor").href;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﺑﺎﯿﺑ ﺍﺭ ﺪﻧﻮﯿﭘ ﮏﯾ hreflang ﯽﮔﮋﯾﻭ ﺭﺍﺪﻘﻣ

<!DOCTYPE html>
<html>
<body>

<p><a id="myAnchor" hreflang="en-us" href="https://www.w3schools.com/">W3Schools</a></p>

<p>Click the button to display the value of the hreflang attribute of the link above.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("myAnchor").hreflang;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ id a link ﯽﮔﮋﯾﻭ ﺭﺍﺪﻘﻣ

<!DOCTYPE html>
<html>
<body>

<p><a id="myAnchor" href="https://www.w3schools.com/">W3Schools</a></p>

<p>Click the button to display the value of the id attribute of the link above.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("myAnchor").id;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﺑﺎﯿﺑ ﺍﺭ ﺪﻧﻮﯿﭘ ﮏﯾ rel ﯽﮔﮋﯾﻭ ﺭﺍﺪﻘﻣ

<!DOCTYPE html>
<html>
<body>

<p><a id="myAnchor" rel="nofollow" href="https://www.w3schools.com/">W3Schools</a></p>

<p>Click the button to display the value of the rel attribute of the link above.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("myAnchor").rel;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﺑﺎﯿﺑ ﺍﺭ ﺪﻧﻮﯿﭘ ﮏﯾ ﻑﺪﻫ ﻪﺼﺨﺸﻣ ﺭﺍﺪﻘﻣ

<!DOCTYPE html>
<html>
<body>

<p><a id="w3s" target="_self" href="https://www.w3schools.com/">W3Schools</a></p>

<p>Click the button to display the value of the target attribute of the link above.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("w3s").target;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﺑﺎﯿﺑ ﺍﺭ ﺪﻧﻮﯿﭘ ﮏﯾ type ﯽﮔﮋﯾﻭ ﺭﺍﺪﻘﻣ

<!DOCTYPE html>
<html>
<body>

<p><a id="myAnchor" type="text/html" href="https://www.w3schools.com/">W3Schools</a></p>

<p>Click the button to return the value of the type attribute of the link above.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("myAnchor").type;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﻪﻘﻄﻨﻣ ﯽﺷ

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ ﻪﺸﻘﻧ-ﺮﯾﻮﺼﺗ ﻪﻘﻄﻨﻣ ﮏﯾ ﻦﯾﺰﮕﯾﺎﺟ ﻦﺘﻣ

<!DOCTYPE html>
<html>
<body>

<img src="planets.gif" width="145" height="126" usemap="#planetmap">

<map name="planetmap">
  <area id="venus" shape="circle" coords="124,58,8" alt="A beautiful planet" href="venus.htm">
</map>

<p>Click the button to display the alternate text for the "venus" area.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("venus").alt;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ ﻪﯿﺣﺎﻧ ﮏﯾ ﺕﺎﺼﺘﺨﻣ

<!DOCTYPE html>
<html>
<body>

<img src="planets.gif" width="145" height="126" usemap="#planetmap">

<map name="planetmap">
  <area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>

<p>Click the button to display the coordinates for the "venus" area.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("venus").coords;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ ﻪﯿﺣﺎﻧ ﮏﯾ ﻞﮑﺷ

<!DOCTYPE html>
<html>
<body>

<img src="planets.gif" width="145" height="126" usemap="#planetmap">

<map name="planetmap">
  <area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>

<p>Click the button to return the shape of the "venus" area in the image-map.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("venus").shape;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

href ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ ﻪﻘﻄﻨﻣ ﮏﯾ

<!DOCTYPE html>
<html>
<body>

<img src="planets.gif" width="145" height="126" usemap="#planetmap">

<map name="planetmap">
  <area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>

<p>Click the button to display the value of the href attribute for the "venus" area.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("venus").href;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ ﻪﯿﺣﺎﻧ ﮏﯾ href ﯽﮔﮋﯾﻭ ﻞﮑﺗﻭﺮﭘ ﺖﻤﺴﻗ

<!DOCTYPE html>
<html>
<body>

<img src="planets.gif" width="145" height="126" usemap="#planetmap">

<map name="planetmap">
<area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>

<p>Click the button to display the protocol of the href attribute for the "venus" area.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("venus").protocol;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ ﻪﯿﺣﺎﻧ ﮏﯾ href ﯽﮔﮋﯾﻭ ﺯﺍ ﻥﺎﺑﺰﯿﻣ ﻡﺎﻧ ﺖﻤﺴﻗ

<!DOCTYPE html>
<html>
<body>

<img src="planets.gif" width="145" height="126" usemap="#planetmap">

<map name="planetmap">
  <area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>

<p>Click the button to display the hostname of the href attribute for the "venus" area.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("venus").hostname;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ ﻪﯿﺣﺎﻧ ﮏﯾ href ﯽﮔﮋﯾﻭ ﺯﺍ ﺕﺭﻮﭘ ﻩﺭﺎﻤﺷ ﺖﻤﺴﻗ

<!DOCTYPE html>
<html>
<body>

<img src="planets.gif" width="145" height="126" usemap="#planetmap">

<map name="planetmap">
  <area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>

<p>Click the button to display the port of the href attribute for the "venus" area in the image-map.</p>

<p><b>Note:</b> If the port part is not specified in the URL, or if the port number is 80 (which is default), some browsers will just display 0 or nothing.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("venus").port;
  document.getElementById("demo").innerHTML = "Port: " + x;
}
</script>

</body>
</html>

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ ﻪﯿﺣﺎﻧ ﮏﯾ href ﯽﮔﮋﯾﻭ ﺯﺍ ﺮﯿﺴﻣ ﻡﺎﻧ ﺖﻤﺴﻗ

<!DOCTYPE html>
<html>
<body>

<img src="planets.gif" width="145" height="126" usemap="#planetmap">

<map name="planetmap">
  <area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>

<p>Click the button to display the pathname of the href attribute for the "venus" area in the image-map.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("venus").pathname;
  document.getElementById("demo").innerHTML=x;
}
</script>

</body>
</html>

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ ﻪﯿﺣﺎﻧ ﮏﯾ href ﯽﮔﮋﯾﻭ ﺯﺍ querystring ﺖﻤﺴﻗ

<!DOCTYPE html>
<html>
<body>

<img src="planets.gif" width="145" height="126" usemap="#planetmap">

<map name="planetmap">
  <area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm?id=venus">
</map>

<p>Click the button to display the querystring part of the href attribute for the "venus" area.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("venus").search;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ ﻪﯿﺣﺎﻧ ﮏﯾ href ﯽﮔﮋﯾﻭ ﺶﻫ ﺖﻤﺴﻗ

<!DOCTYPE html>
<html>
<body>

<img src="planets.gif" width="145" height="126" usemap="#planetmap">

<map name="planetmap">
  <area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm#description">
</map>

<p>Click the button to display the anchor part of the href attribute for the "venus" area.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("venus").hash;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﺑﺎﯿﺑ ﺍﺭ ﻪﯿﺣﺎﻧ ﮏﯾ ﻑﺪﻫ ﻪﺼﺨﺸﻣ ﺭﺍﺪﻘﻣ

<!DOCTYPE html>
<html>
<body>

<img src="planets.gif" width="145" height="126" usemap="#planetmap">

<map name="planetmap">
  <area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm" target="_self">
</map>

<p>Click the button to return the value of the target attribute for the "venus" area in the image-map.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("venus").target;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﻪﯾﺎﭘ ﯽﺷ

URL ﻪﻤﻫ ﯼﺍﺮﺑ ﺍﺭ ﻪﯾﺎﭘ URL ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﻪﺤﻔﺻ ﮏﯾ ﺭﺩ ﻂﺒﺗﺮﻣ ﯼﺎﻫ

<!DOCTYPE html>
<html>
<head>
<base id="htmldom" href="https://www.w3schools.com/jsref/">
</head>
<body>

<p>Click the button to display the value of the href attribute of the base element.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("htmldom").href;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﻪﺤﻔﺻ ﮏﯾ ﯼﺎﻫﺪﻧﻮﯿﭘ ﻪﻤﻫ ﯼﺍﺮﺑ ﺍﺭ ﯽﻠﺻﺍ ﻑﺪﻫ

<!DOCTYPE html>
<html>
<head>
<base id="htmldom" target="_self" href="https://www.w3schools.com/jsref/">
</head>
<body>

<p>Click the button to display the value of the target attribute of the base element.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("htmldom").target;
  document.getElementById("demo").innerHTML = "Base target for all links: " + x;
}
</script>

</body>
</html>

IFrame ﺖﮑﺠﺑﺁ

ﺪﯿﻫﺩ ﺮﯿﯿﻐﺗ ﺍﺭ iframe ﻪﻨﯿﻣﺯ ﺲﭘ ﮓﻧﺭ

<!DOCTYPE html>
<html>
<body>

<iframe id="myframe" src="demo_iframe.htm">
<p>Your browser does not support iframes.</p>
</iframe>

<p>Click the button to change the background color of the document in the iframe.</p>

<p id="demo"></p>

<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
  var x = document.getElementById("myframe");
  x.style.backgroundColor = "red";
}
</script>

</body>
</html>

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ iframe ﻉﺎﻔﺗﺭﺍ

<!DOCTYPE html>
<html>
<body>

<iframe id="myframe" src="/default.asp" height="200" width="250">
<p>Your browser does not support iframes.</p>
</iframe>

<p>Click the button to display the height of the iframe.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("myframe").height;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﺑﺎﯿﺑ ﺍﺭ iframe ﮏﯾ ﻡﺎﻧ ﯽﮔﮋﯾﻭ ﺭﺍﺪﻘﻣ

<!DOCTYPE html>
<html>
<body>

<iframe id="myframe" src="/default.asp" name="iframe_a"></iframe>

<p>Click the button to return the name of the iframe.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("myframe").name;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ iframe ﮏﯾ (src) ﻊﺒﻨﻣ ﯽﮔﮋﯾﻭ

<!DOCTYPE html>
<html>
<body>

<iframe id="myframe" src="/default.asp"></iframe>

<p>Click the button to display the value of the src attribute in the iframe.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("myframe").src;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﻫﺩ ﺮﯿﯿﻐﺗ ﺍﺭ iframe ﮏﯾ (src) ﻊﺒﻨﻣ ﯽﮔﮋﯾﻭ

<!DOCTYPE html>
<html>
<body>

<iframe id="myframe" src="/default.asp"></iframe>

<p>Click the button to change the src attribute in the iframe.</p>

<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
  document.getElementById("myframe").src = "http://www.cnn.com";
}
</script>

</body>
</html>

ﺮﯾﻮﺼﺗ ءﯽﺷ

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ ﺮﯾﻮﺼﺗ ﮏﯾ ﻦﯾﺰﮕﯾﺎﺟ ﻦﺘﻣ

<!DOCTYPE html>
<html>
<body>

<img id="myImg" src="compman.gif" alt="Crazy computerman" width="107" height="98">

<p>Click the button to display the alternate text of the image.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("myImg").alt;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ ﺮﯾﻮﺼﺗ ﮏﯾ ﻉﺎﻔﺗﺭﺍ

<!DOCTYPE html>
<html>
<body>

<img id="myImg" src="compman.gif" width="107" height="98">

<p>Click the button to display the height of the image.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("myImg").height;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﻨﮐ ﮏﯿﻠﮐ ﺮﯾﻮﺼﺗ ﮏﯾ ﺯﺍ ﻻﺎﺑ ﺡﻮﺿﻭ ﺎﺑ ﻪﺨﺴﻧ ﮏﯾ ﺶﯾﺎﻤﻧ ﯼﺍﺮﺑ

<!DOCTYPE html>
<html>
<body>
<script>
function changeImage() {
  document.getElementById('myimage').src = "compman.gif";
}
</script>

<img id="myimage" onclick="changeImage()" src="compman_lowres.gif" width="107" height="98">

<p>Click the image to display a high resolution version.</p>

</body>
</html>

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ ﺮﯾﻮﺼﺗ ﮏﯾ (src) ﻊﺒﻨﻣ

<!DOCTYPE html>
<html>
<body>

<img id="myImg" src="compman.gif" width="107" height="98">

<p>Click the button to display the src attribute of the image.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("myImg").src;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﺪﯿﻫﺩ ﺮﯿﯿﻐﺗ ﺍﺭ ﺮﯾﻮﺼﺗ ﮏﯾ ﻊﺒﻨﻣ

<!DOCTYPE html>
<html>
<body>

<img id="myImg" src="compman_lowres.gif" width="107" height="98">
<br><br>
<button onclick="document.getElementById('myImg').src='compman.gif'">On</button>
<button onclick="document.getElementById('myImg').src='compman_lowres.gif'">Off</button>

</body>
</html>

ﺪﯿﻫﺩ ﺮﯿﯿﻐﺗ ﺍﺭ ﭗﻣﻻ ﻊﺒﻨﻣ

<!DOCTYPE html>
<html>
<body>

<img id="myImage" onclick="changeImage()" src="pic_bulboff.gif" width="100" height="180">

<p>Click the light bulb to turn on/off the light.</p>

<script>
function changeImage() {
  var image = document.getElementById('myImage');
  if (image.src.match("bulbon")) {
    image.src = "pic_bulboff.gif";
  } else {
    image.src = "pic_bulbon.gif";
  }
}
</script>

</body>
</html>

ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ ﺮﯾﻮﺼﺗ ﮏﯾ usemap ﯽﮔﮋﯾﻭ ﺭﺍﺪﻘﻣ

<!DOCTYPE html>
<html>
<body>

<img id="planets" src="planets.gif" width="145" height="126" usemap="#planetmap">

<map name="planetmap">
  <area id="venus" shape="circle" coords="124,58,8" alt="The planet venus" href="venus.htm">
</map>

<p>Click the button to display the value of the usemap attribute of the image.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var x = document.getElementById("planets").useMap;
  document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

ﻝﻭﺪﺟ ءﺎﯿﺷﺍ

ﺪﯿﻫﺩ ﺮﯿﯿﻐﺗ ﺍﺭ ﻝﻭﺪﺟ ﻪﯿﺷﺎﺣ ﺽﺮﻋ

<!DOCTYPE html>
<html>
<head>
<script>
function changeBorder(id) {
  document.getElementById(id).style.border = "5px solid";
}
</script>
</head>
<body>

<table style="border:1px solid black" id="myTable">
  <tr>
    <td>100</td>
    <td>200</td>
  </tr>
  <tr>
    <td>300</td>
    <td>400</td>
  </tr>
</table>

<p>
<input type="button" onclick="changeBorder('myTable')" value="Change Border">
</p>

</body>
</html>

ﺪﯿﻫﺩ ﺮﯿﯿﻐﺗ ﺍﺭ ﺰﯿﻣ ﮏﯾ ﯼﺪﻨﺑ ﻪﯾﻻ

<!DOCTYPE html>
<html>
<head>
<script>
function padding(id) {
  document.getElementById(id).style.padding = "15px";
}

</script>
</head>
<body>

<table id="myTable" style="border:1px solid black">
  <tr>
    <td>100</td>
    <td>200</td>
  </tr>
  <tr>
    <td>300</td>
    <td>400</td>
  </tr>
</table>

<p>
<input type="button" onclick="padding('myTable')" value="Change padding">
</p>

</body>
</html>

HTML ﺪﯿﻨﮐ ﺍﺪﯿﭘ ﺍﺭ ﻝﻮﻠﺳ ﮏﯾ ﯽﻠﺧﺍﺩ

<!DOCTYPE html>
<html>
<head>
<script>
function getCellContent(id) {
  var x = document.getElementById(id).rows[0].cells;
  document.getElementById("demo").innerHTML = x[0].innerHTML;
}
</script>
</head>
<body>

<table id="myTable" style="border: 1px solid black">
  <tr>
    <td>cell 1</td>
    <td>cell 2</td>
  </tr>
  <tr>
    <td>cell 3</td>
    <td>cell 4</td>
  </tr>
</table>

<p>
<input type="button" onclick="getCellContent('myTable')" value="Display first cell">
</p>

<p id="demo"></p>

</body>
</html>

ﺪﯿﻨﮐ ﺩﺎﺠﯾﺍ ﻝﻭﺪﺟ ﯼﺍﺮﺑ ﻥﺍﻮﻨﻋ ﮏﯾ

<!DOCTYPE html>
<html>
<head>
<script>
function createCaption(id) {
  document.getElementById(id).createCaption().innerHTML = "My new caption";
}
</script>
</head>
<body>

<table id="myTable" style="border: 1px solid black">
  <tr>
    <td>Row1 cell1</td>
    <td>Row1 cell2</td>
  </tr>
  <tr>
    <td>Row2 cell1</td>
    <td>Row2 cell2</td>
  </tr>
</table>

<p>
<input type="button" onclick="createCaption('myTable')" value="Create caption">
</p>

</body>
</html>

ﺪﯿﻨﮐ ﻑﺬﺣ ﺍﺭ ﻝﻭﺪﺟ ﮏﯾ ﯼﺎﻫﺮﻄﺳ

<!DOCTYPE html>
<html>
<body>

<table id="myTable" style="padding:8px;border:1px solid black">
  <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>
<input type="button" value="Delete one Row"
onclick="document.getElementById('myTable').deleteRow(0)">
</p>

</body>
</html>

ﺪﯿﻨﮐ ﻪﻓﺎﺿﺍ ﻝﻭﺪﺟ ﻪﺑ ﺍﺭ ﺎﻫﺮﻄﺳ

<!DOCTYPE html>
<html>
<head>
<script>
function insRow(id) {
  var x = document.getElementById(id).insertRow(0);
  var y = x.insertCell(0);
  var z = x.insertCell(1);
  y.innerHTML = z.innerHTML = "New";
}
</script>
</head>

<body>
<table id="myTable" style="border: 1px solid black">
  <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>

<p>
<input type="button" onclick="insRow('myTable')" value="Insert row">
</p>

</body>
</html>

ﺪﯿﻫﺩ ﺮﯿﯿﻐﺗ ﺍﺭ ﻝﻭﺪﺟ ﻝﻮﻠﺳ ﮏﯾ ﯼﺍﻮﺘﺤﻣ

<!DOCTYPE html>
<html>
<head>
<script>
function changeContent(id, row, cell, content) {
  var x = document.getElementById(id).rows[row].cells;
  x[cell].innerHTML = content;
}
</script>
</head>
<body>

<table id="myTable" border="1">
  <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>

<p>
<input type="button" onclick="changeContent('myTable', 0, 0, 'Hello')" value="Change content">
</p>

</body>
</html>