毕业论文开发语言企业开发JAVA技术.NET技术WEB开发Linux/Unix数据库技术Windows平台移动平台嵌入式论文范文英语论文
您现在的位置: 毕业论文 >> WEB开发 >> 正文

var t=$("#temp").click(function(){alert("1");});单击事件不管用

更新时间:2013-1-18:  来源:毕业论文

var t=$("#temp").click(function(){alert("1");});单击事件不管用
<html>     <head>         <title></title>         <style type="text/css">             #page{                 width:1020px;       新年祝福网页           margin-left:auto;                 margin-right: auto;             }             .nav1{                 float:left;             }             li{                 list-style-type:none;             }                       </style>         <script language="javascript" src="jquery-1.7.2.js" type="text/javascript" ></script>         <script language="javascript" src="jquery162.js" type="text/javascript" ></script>         <script language="javascript" type="text/javascript">             $("#topmenu .nav1 li a").bind('click',function(){alert(1);});             var t=$("#temp").click(function(){alert("1");});             var util={                 openSecondMenu:function(e){                     var targetName=e.target.name;                     switch(targetName)                     {                         case "f1":                             window.position="f1";                             $("#second_menu").append("<li><a name='s1'>呼叫记录1</a></li>");                             $("#second_menu").append("<li><a name='s2'>呼叫记录2</a></li>");                         break;                         case "f2":                                                       break;                         case "f3":                                                   break;                         case "f4":                                                   break;                         case "f5":                                                   break;                         case "f6":                                   break;                         case "f7":                                   break;                         case "f8":                                   break;                         case "f9":                                   break;                         default:break;                     }                 }                               }         </script>     </head>     <body>         <div id="temp" style="background-color:red;">aaa</div>         <div id="page">             <table>                 <tr id="menu">                     <div id="top" id="topmenu">                                 <div class="nav1">                                     <li>                                         <a name="f1">话单记录</a>                                     </li>                                 </div>                                 <div class="nav1">                                     <li>                                         <a name="f2">呼叫分析</a>                                     </li>                                 </div>                                 <div class="nav1">                                     <li>                                         <a name="f3">坐席报表</a>                                     </li>                                 </div>                                 <div class="nav1">                                     <li>                                         <a name="f4">队列报表</a>                                     </li>                                 </div>                                 <div class="nav1">                                     <li>                                         <a name="f5">实时分析</a>                                     </li>                                 </div>                                 <div class="nav1">                                     <li>                                         <a name="f6">语音导航</a>                                     </li>                                 </div>                                 <div class="nav1">                                     <li>                                         <a name="f7">短信报表</a>                                     </li>                                 </div>                                 <div class="nav1">                                     <li>                                         <a name="f8">传真报表</a>                                     </li>                                 </div>                                 <div class="nav1">                                     <li>                                         <a name="f9">其他报表</a>                                     </li>                                 </div>                                 <div style="clear:both;"></div>                     </div>                 </tr>                 <tr id="content">                     <td valign="top" width="125px" height="800px">                         <div height="800px" id="second_menu" class="nav">                             <li>                                 <a>呼叫记录1</a>                             </li>                         </div>                     </td>                     <td>                         <iframe width="895px" height="800px" frameborder="0" src="http://192.168.100.20/admin/cdr/cdr.php?s=0" valign="top">                         </iframe>                     </td>                 </tr>             </table>         </div>     </body> </html>

页面没有加载完是找不到dom对象的
另外修改下div的id,有两个
然后就ok了

[1] [2] 下一页

设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优尔论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。