日期:2014-05-16  浏览次数:20480 次

菜鸟学JQuery,代码运行出来的结果是点击按钮隐藏的层不显示
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/style.css" rel="stylesheet" />
<title>弹出层</title>
<script type="text/javascript" src="jquery-1.8.2.min.js"></script>
</head>

<body>
<script type="text/javascript">
   $("#a").click(
  function()
{
 $("#pop_layer").show();
}
);
</script>
    <input type="button" value="button" id="a" />
<div class="pop_layer" id="pop_layer" style="display:none">
       <div class="pop_layer_title"><h3>新建后台帐号</h3><a href=""></a></div>
       <form action="" method="post" class="pop_layer_form">
          <p><label><span class="red">*</span>账号:</label><input type="text" class="pop_layer_text" /><span class="error_info"></span></p>
          <p><label><span class="red">*</span>用户名:</label><input type="text" class="pop_layer_text" /></p>
          <p><label><span class="red">*</span>用户名:</label><input type="text" class="pop_layer_text" /></p>
          <p><label><span class="red">*</span>用户名:</label><input type="text" class="pop_layer_text" /></p>
          <p><label><span class="red">*</span>用户名:</label><input type="text" class="pop_layer_text" /></p>
          <p><label><span class="red">*</span>手机号:</label><input type="text" class="pop_layer_text" /></p>
          <p class="remark">建议不超过20个字</p>
          <p class="password">初始密码:123456</p>
          <p class="p_l_75"><input type="button" value="确定" class="pop_layer_btn" /><input type="button" value="取消" class="pop_layer_btn"/></p>