找了半天没找出是什么问题,各位帮着看看吧,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>