日期:2014-05-18  浏览次数:20463 次

[js] 像163邮箱效果怎样实现?-- 点击一行空白地方选中该行checkbox
如题,用IE   dev   toolbar察看源码时,并没有发现tr的onclick事件,下面是一行邮件的代码:


<tr   class= "     mark0 "   id= "tr_inbox_1 "   onmouseover= "MM[ 'inbox '].trMouseOver(this); "
                title= "可拖动该邮件到左边相应的文件夹里 "   style= "cursor:   pointer "   onmouseout= "MM[ 'inbox '].trMouseOut(this); ">
                <td   class= "ii1 ">
                </td>
                <td   class= "ii2 ">
                        <span   id= "cbspan_inbox_1 "   style= "display:   none ">
                                <input   id= "checkbox_inbox_1 "   title= "选择/不选 "   onclick= "MM.inbox.setTrClass(this,this.checked);$( 'checkbox_inbox_all ').checked=false;MM.inbox.handleShift(); "
                                        type= "checkbox "   name= "checkbox_inbox "   value= "324:xtbBRAadC0X0KXjtawABsz "   /> </span> <span
                                                id= "stspan_inbox_1 "> <img   id= "readpic_inbox_1 "   alt= "已读 "   src= "http://p.mail.163.com/dm3style/lib/images/for_ibx/hdRd.gif "   /> <img
                                                        id= "levelpic_inbox_1 "   style= "display:   none "   alt= "普通 "   src= "about:blank "   /> </span> </td>
                <td   class= "ii2a ">
                        <img   id= "markpic_inbox_1 "   onclick= "MM[ 'inbox '].flag= 'flag_inbox_1 ';MM[ 'inbox '].showFlagSetDiv(); "
                                alt= "未分类 "   src= "http://p.mail.163.com/dm3style/lib/images/for_ibx/mark0.gif "   /> </td>
                <td   class= "ii3 ">
                        <nobr> <A   title= "support@krugle.com "   onclick= "MM.inbox.gotoRead( '1 ', '324:xtbBRAadC0X0KXjtawABsz ',1) "   href= "javascript:fGoto(); "> Krugle   <SUPPORT@KRUGLE.COM> </SUPPORT@KRUGLE.COM> </A> </nobr>
                </td>
                <td   class= "ii6 ">