olampiad
جمعه 26 مهر 1392, 00:58 صبح
سلام
مشکل این کد چیه؟
document.getElementById('jj').onclick=function(){
document.getElementsByClassName('hidden-text').style.display=block;
}
من می خوام موقعی که روی لینک کلیک شد دایومان نمایش داده شود.
ولی کار نمی کند.
اینم کد html
<a id="jj" href="">click</a>
<div class="hidden-text" id="ff" >
<p>More than 50,000 school students travelled from across the province to attend the event to see first-hand what career options are available in the skills, trades and technology sectors. They also test-drove various skills at the Try-A-Skill tent.</p>
<p>More than 55 Calgary schools participated in the One School One Country program, where elementary schools adopted a team and learned about the culture of their country prior to meeting their team’s Competitors at their school prior to competition.</p>
</div>
مشکل این کد چیه؟
document.getElementById('jj').onclick=function(){
document.getElementsByClassName('hidden-text').style.display=block;
}
من می خوام موقعی که روی لینک کلیک شد دایومان نمایش داده شود.
ولی کار نمی کند.
اینم کد html
<a id="jj" href="">click</a>
<div class="hidden-text" id="ff" >
<p>More than 50,000 school students travelled from across the province to attend the event to see first-hand what career options are available in the skills, trades and technology sectors. They also test-drove various skills at the Try-A-Skill tent.</p>
<p>More than 55 Calgary schools participated in the One School One Country program, where elementary schools adopted a team and learned about the culture of their country prior to meeting their team’s Competitors at their school prior to competition.</p>
</div>