how to call the methos
Posted
by vicky
on Stack Overflow
See other posts from Stack Overflow
or by vicky
Published on 2010-03-30T00:41:05Z
Indexed on
2010/03/30
0:43 UTC
Read the original article
Hit count: 367
JavaScript
|javascript-framework
for (i = 0; i < 4; i++)
{
DeCheBX = $('MyDiv').insert(new Element('input', { 'type': 'checkbox', 'id': "Img" + obj[i].Nam, 'value': obj[i].IM, 'onClick': 'shohide()' }));
document.body.appendChild(DeCheBX);
DeImg = $('MyDiv').insert(new Element('img', { 'id': "Imgx" + obj[i].Nam, 'src': obj[i].IM }));
document.body.appendChild(DeImg);
}
function shohide()
{
for (i = 0; i < 4; i++)
{
($('Img' + obj[i].Nam).checked == true)
{
alert("press" + obj[i].Nam);
}
}
}
© Stack Overflow or respective owner