onclick不适用于动态创建的按钮..在这种特殊情况下如何解决这个问题?

时间:2014-04-30 16:41:02

标签: javascript onclick

点击不适用于这个动态创建的按钮,该按钮应该在点击后显示弹出窗口,如何通过解决此内联在这个特定情况下执行此操作..

<a href="#" onclick="return false;">
    <img src="includes/languages/english/images/buttons/button_select.gif"
       border="0" alt="Select" title=" Select " 
       onclick="popupWindowSelectImg(\'./images_select.php?imgSize=thumb&inpt=products_image_sm_1&div=div_img_sm1&width=200&height=30\',"thumb","products_image_sm_1","div_img_sm1");"/>
</a>

1 个答案:

答案 0 :(得分:0)

你去吧

<a href="#" onclick="return false;">
<img src="includes/languages/english/images/buttons/button_select.gif"
   border="0" alt="Select" title=" Select " 
   onclick="popupWindowSelectImg('images_select.php?imgSize=thumb&inpt=products_image_sm_1&div=div_img_sm1&width=200&height=30','thumb','products_image_sm_1','div_img_sm1'); return false;"/>

http://jsfiddle.net/HdL6u/