有个问题,在如下代码中当把鼠标放到td4的json.fk_document_sign_set_code的时候( index.js code ),
根据json.fk_document_sign_set_code的值(AA,AC,AD),显示不同的内容
就是说当鼠标移动到AA的时候显示某某固定的内容,移动到AC的时候显示某某固定的内容
这些固定的内容已经存在,就看怎么放。是用mouseover么?一般用title可以这么做,但这个是针对不同的值来显示不同的内容,所以不好用title
index.php code <thead>
<tr>
<td class="td1">{=_('No')}</td>
<td class="td2">{=_('文档编号')}</td>
<td class="td3">{=_('主题')}</td>
<td class="td4">{=_('审批编号')}</td>
<td class="td5">{=_('应用与否')}</td>
<td class="td6">{=_('编辑')}</td>
</tr>
</thead>
index.js codeSioOrderManager.prototype.draw = function(json)
{
var tag = [];
tag.push('<td class="td1">'+json.no+'</td>');
tag.push('<td class="td2">'+json.document_code+'</td>');
tag.push('<td class="td3">'+json.document_name+'</td>');
tag.push('<td class="td4">'+json.fk_document_sign_set_code+'</td>');
tag.push('<td class="td5">'+json.document_use_flag+'</td>');
tag.push('<td class="td6"><button class="btn edit" code="'+json.document_code+'">Edit</button></td>');
return tag.join("");
};

解决方案 »

  1.   

    help  please help 
      

  2.   

    nobody help? please help me !
      

  3.   

    tag.push('<td class="td4" onmouserover="alert(this.innerText)">'+json.fk_document_sign_set_code+'</td>');
      

  4.   

    多了个r 应该是 onmouseover
      

  5.   

    谢谢4楼,但我想要的是title的效果(类似这种<li title="显示的内容">...)
    当json.fk_document_sign_code 有几个值 AA,AC, AD 这样显示在目录页面。当鼠标移动到AA的时候用title的效果显示(这是AA)
    当鼠标移动到AC的时候用title的效果显示(这是AC) 这样。
      

  6.   

    mei ren bang wo ma ???