日期:2014-05-17  浏览次数:20936 次

为什么点击后,红色代码位置没有显示出来
<script type="text/javascript">
function theforever(a){
  document.getElementById('content').innerHTML='<iframe src="'+a.url+'" width=100% height=100%></iframe>';
}
</script>

。。。。。。。省略
<tr class=CommonListTitle>
<td height="34">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a url="xf.asp" onClick="theforever(this);">学费统计</a>
</td>
</tr>
</table>
 
</td>
  </tr>

  </table></td>
  <td width="80%" valign="top"><div id="content"></div> </td>
  </tr>
</table>

为什么点击学费统计后,红色代码位置没有显示出来

------解决方案--------------------
a标签哪有url属性,只有href
改下
;<a href="xf.asp" onClick="return theforever(this);">

然后在你的 theforever函数最后加上return false即可