.ﺪﻨﺘﻓﺍﯽﻣ ﻕﺎﻔﺗﺍ HTML ﺮﺻﺎﻨﻋ ﯼﺍﺮﺑ ﻪﮐ ﺪﻨﺘﺴﻫ «ﯽﯾﺎﻫﺰﯿﭼ»
ﺪﻧﺍﻮﺗ ﯽﻣ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ،ﺩﻮﺷ ﯽﻣ ﻩﺩﺎﻔﺘﺳﺍ HTML ﺕﺎﺤﻔﺻ ﺭﺩ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ﻪﮐ ﯽﻣﺎﮕﻨﻫ
.ﺪﻫﺩ ﯽﻣ ﻡﺎﺠﻧﺍ ﺮﺑﺭﺎﮐ ﻪﮐ ﯼﺭﺎﮐ ﺎﯾ ﺪﻫﺩ ﯽﻣ ﻡﺎﺠﻧﺍ ﺮﮔﺭﻭﺮﻣ ﻪﮐ ﺪﺷﺎﺑ ﯼﺭﺎﮐ ﺪﻧﺍﻮﺗ ﯽﻣ HTML ﺩﺍﺪﯾﻭﺭ ﮏﯾ
:ﺖﺳﺍ ﻩﺪﺷ ﻩﺩﺭﻭﺁ HTML ﯼﺎﻫﺩﺍﺪﯾﻭﺭ ﺯﺍ ﻪﻧﻮﻤﻧ ﺪﻨﭼ ﺎﺠﻨﯾﺍ ﺭﺩ
ﺖﺳﺍ ﻩﺪﺷ ﯼﺮﯿﮔﺭﺎﺑ HTML ﺏﻭ ﻪﺤﻔﺻ ﮏﯾ
ﺩﺮﮐ ﺮﯿﯿﻐﺗ HTML ﯼﺩﻭﺭﻭ ﺪﻠﯿﻓ ﮏﯾ
ﺪﺷ ﮏﯿﻠﮐ HTML ﻪﻤﮐﺩ ﮏﯾ
.ﺪﯿﻫﺩ ﻡﺎﺠﻧﺍ ﯼﺭﺎﮐ ﺪﯿﻫﺍﻮﺨﺑ ﺖﺳﺍ ﻦﮑﻤﻣ ،ﺪﻫﺩ ﯽﻣ ﺥﺭ ﯽﺗﺎﻗﺎﻔﺗﺍ ﻪﮐ ﯽﻧﺎﻣﺯ ،ﺐﻠﻏﺍ
.ﺪﯿﻨﮐ ﺍﺮﺟﺍ ﺍﺭ ﺪﮐ ،ﺪﻧﻮﺷ ﯽﻣ ﯽﯾﺎﺳﺎﻨﺷ ﺎﻫﺩﺍﺪﯾﻭﺭ ﻪﮐ ﯽﻧﺎﻣﺯ ﺎﺗ ﺪﻫﺩ ﯽﻣ ﻥﺎﮑﻣﺍ ﺎﻤﺷ ﻪﺑ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ
HTML ﺩﺍﺪﯾﻭﺭ ﻩﺪﻨﻨﮐ ﻝﺮﺘﻨﮐ ﯼﺎﻫ ﯽﮔﮋﯾﻭ ﺎﺗ ﺪﻫﺩ ﯽﻣ ﻩﺯﺎﺟﺍ، ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ﺪﮐ ﺎﺑ، ﺮﺻﺎﻨﻋ ﻪﺑ HTML ﺪﻧﻮﺷ ﻪﻓﺎﺿﺍ.
:ﮏﺗ ﻝﻮﻗ ﻞﻘﻧ ﺎﺑ
<element
event='some JavaScript'>
:ﻝﻮﻗ ﻞﻘﻧ ﻭﺩ ﺎﺑ
<element
event="some JavaScript">
.ﺖﺳﺍ ﻩﺪﺷ ﻪﻓﺎﺿﺍ ﯽﮔﮋﯾﻭ ﮏﯾ ﻪﺑ ،(ﺪﮐ ﺎﺑ) onclick
ﯽﮔﮋﯾﻭ ﮏﯾ ،ﺮﯾﺯ ﻝﺎﺜﻣ ﺭﺩ
<button onclick="document.getElementById('demo').innerHTML = Date()">The time is?</button>
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<button onclick="document.getElementById('demo').innerHTML=Date()">The time is?</button>
<p id="demo"></p>
</body>
</html>
ﺪﻫﺩ ﯽﻣ ﺮﯿﯿﻐﺗ ﺍﺭ ﻥﺁ ﯼﺍﻮﺘﺤﻣ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ﺪﮐ ،ﻻﺎﺑ ﻝﺎﺜﻣ ﺭﺩ
ﺪﻫﺩ ﯽﻣ ﺮﯿﯿﻐﺗ ﺍﺭ ﻥﺁ ﯼﺍﻮﺘﺤﻣ ﺪﮐ ،ﯼﺪﻌﺑ ﻝﺎﺜﻣ ﺭﺩ
<button onclick="this.innerHTML = Date()">The time is?</button>
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript HTML Events</h2>
<button onclick="this.innerHTML=Date()">The time is?</button>
</body>
</html>
:ﻢﯿﻨﮐ ﻩﺪﻫﺎﺸﻣ ﻊﺑﺍﻮﺗ ﯽﻧﺍﻮﺧﺍﺮﻓ ﺍﺭ ﺩﺍﺪﯾﻭﺭ ﯼﺎﻫ ﯽﮔﮋﯾﻭ ﻪﮐ ﺖﺳﺍ ﻝﻭﺍﺪﺘﻣ ﺮﺘﺸﯿﺑ .ﺩﺭﺍﺩ ﻝﻮﻃ ﻂﺧ ﻦﯾﺪﻨﭼ ﺐﻠﻏﺍ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ﺪﮐ
<button onclick="displayDate()">The time is?</button>
→ ﺪﯿﻨﮐ ﻥﺎﺤﺘﻣﺍ ﺍﺭ ﻥﺁ ﻥﺎﺗﺩﻮﺧ
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript HTML Events</h2>
<p>Click the button to display the date.</p>
<button onclick="displayDate()">The time is?</button>
<script>
function displayDate() {
document.getElementById("demo").innerHTML = Date();
}
</script>
<p id="demo"></p>
</body>
</html>
:ﺖﺳﺍ ﻩﺪﻣﺁ HTML ﺞﯾﺍﺭ ﯼﺎﻫﺩﺍﺪﯾﻭﺭ ﯽﺧﺮﺑ ﺯﺍ ﯽﺘﺴﯿﻟ ﺎﺠﻨﯾﺍ ﺭﺩ
ﺖﺳﺍ ﻩﺩﺮﮐ ﺮﯿﯿﻐﺗ HTML ﺮﺼﻨﻋ ﮏﯾ
ﺪﻨﮐ ﯽﻣ ﮏﯿﻠﮐ HTML ﺮﺼﻨﻋ ﮏﯾ ﯼﻭﺭ ﺮﺑﺭﺎﮐ
ﺪﻫﺩ ﯽﻣ ﺖﮐﺮﺣ HTML ﺮﺼﻨﻋ ﮏﯾ ﯼﻭﺭ ﺍﺭ ﺱﻮﻣ ﺮﺑﺭﺎﮐ
ﺪﻨﮐ ﯽﻣ ﺭﻭﺩ HTML ﺮﺼﻨﻋ ﮏﯾ ﺯﺍ ﺍﺭ ﺱﻮﻣ ﺮﺑﺭﺎﮐ
ﺪﻫﺩ ﯽﻣ ﺭﺎﺸﻓ ﺍﺭ ﺪﯿﻠﮐ ﻪﺤﻔﺻ ﺪﯿﻠﮐ ﮏﯾ ﺮﺑﺭﺎﮐ
ﺖﺳﺍ ﻩﺪﻧﺎﺳﺭ ﻥﺎﯾﺎﭘ ﻪﺑ ﺍﺭ ﻪﺤﻔﺻ ﯼﺮﯿﮔﺭﺎﺑ ﺮﮔﺭﻭﺮﻣ
.W3Schools JavaScript Reference HTML DOM Events :ﺖﺳﺍ ﺮﺗ ﯽﻧﻻﻮﻃ ﺭﺎﯿﺴﺑ ﺖﺳﺮﻬﻓ
،ﺮﺑﺭﺎﮐ ﺕﺎﻣﺍﺪﻗﺍ ،ﺮﺑﺭﺎﮐ ﯼﺩﻭﺭﻭ ﺪﯿﯾﺄﺗ ﻭ ﺖﯾﺮﯾﺪﻣ ﯼﺍﺮﺑ ﺪﻨﻧﺍﻮﺗﯽﻣ ﺩﺍﺪﯾﻭﺭ ﯼﺎﻫﻩﺪﻨﻨﮐﻝﺮﺘﻨﮐ
ﺪﯿﻫﺩ ﻡﺎﺠﻧﺍ ﺩﻮﺷ ﯽﻣ ﯼﺭﺍﺬﮔﺭﺎﺑ ﻪﺤﻔﺻ ﮏﯾ ﻪﮐ ﺭﺎﺑ ﺮﻫ ﺪﯾﺎﺑ ﻪﮐ ﯽﯾﺎﻫﺭﺎﮐ
ﺩﻮﺷ ﻡﺎﺠﻧﺍ ﻪﺤﻔﺻ ﻥﺪﺷ ﻪﺘﺴﺑ ﻥﺎﻣﺯ ﺭﺩ ﺪﯾﺎﺑ ﻪﮐ ﯽﯾﺎﻫﺭﺎﮐ
ﺩﻮﺷ ﻡﺎﺠﻧﺍ ﺪﻨﮐ ﯽﻣ ﮏﯿﻠﮐ ﯼﺍ ﻪﻤﮐﺩ ﯼﻭﺭ ﺮﺑﺭﺎﮐ ﻪﮐ ﯽﻧﺎﻣﺯ ﺪﯾﺎﺑ ﻪﮐ ﯽﻣﺍﺪﻗﺍ
ﺩﻮﺷ ﺪﯿﯾﺄﺗ ﺮﺑﺭﺎﮐ ﻂﺳﻮﺗ ﻩﺩﺍﺩ ﻥﺩﺮﮐ ﺩﺭﺍﻭ ﻡﺎﮕﻨﻫ ﺪﯾﺎﺑ ﻪﮐ ﯽﯾﺍﻮﺘﺤﻣ
... ﺮﺘﺸﯿﺑ ﻭ
:ﺩﺮﮐ ﻩﺩﺎﻔﺘﺳﺍ ﺎﻫﺩﺍﺪﯾﻭﺭ ﺎﺑ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ﻪﺑ ﻥﺩﺍﺩ ﻩﺯﺎﺟﺍ ﯼﺍﺮﺑ ﻥﺍﻮﺗﯽﻣ ﺍﺭ ﯽﻔﻠﺘﺨﻣ ﯼﺎﻫﺵﻭﺭ
ﺪﻨﻨﮐ ﺍﺮﺟﺍ ﺎًﻤﯿﻘﺘﺴﻣ ﺍﺭ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ﺪﮐ ﺪﻨﻧﺍﻮﺗ ﯽﻣ HTML ﺩﺍﺪﯾﻭﺭ ﯼﺎﻫ ﯽﮔﮋﯾﻭ
ﺪﻨﻨﮐ ﯽﻧﺍﻮﺧﺍﺮﻓ ﺍﺭ ﺖﭙﯾﺮﮑﺳﺍ ﺍﻭﺎﺟ ﻊﺑﺍﻮﺗ ﺪﻨﻧﺍﻮﺗ ﯽﻣ HTML ﺩﺍﺪﯾﻭﺭ ﯼﺎﻫ ﯽﮔﮋﯾﻭ
ﺪﯿﻫﺩ ﺹﺎﺼﺘﺧﺍ HTML ﺮﺻﺎﻨﻋ ﻪﺑ ﺍﺭ ﺩﻮﺧ ﺩﺍﺪﯾﻭﺭ ﺖﯾﺮﯾﺪﻣ ﻊﺑﺍﻮﺗ ﺪﯿﻧﺍﻮﺗ ﯽﻣ ﺎﻤﺷ
ﺪﯿﻨﮐ ﯼﺮﯿﮔﻮﻠﺟ ﺎﻫﺩﺍﺪﯾﻭﺭ ﻪﺑ ﯽﮔﺪﯿﺳﺭ ﺎﯾ ﻝﺎﺳﺭﺍ ﺯﺍ ﺪﯿﻧﺍﻮﺗ ﯽﻣ
... ﺮﺘﺸﯿﺑ ﻭ
.ﺖﺧﻮﻣﺁ ﺪﯿﻫﺍﻮﺧ ﺩﺍﺪﯾﻭﺭ ﯼﺎﻫ ﻩﺪﻨﻨﮐ ﻝﺮﺘﻨﮐ ﻭ ﺎﻫﺩﺍﺪﯾﻭﺭ ﺩﺭﻮﻣ ﺭﺩ ﯼﺮﺘﺸﯿﺑ ﺕﺎﻋﻼﻃﺍ HTML DOM ﯼﺎﻫ ﻞﺼﻓ ﺭﺩ