解决方案 »

  1.   

    你这跟jQuery 没关系。
    return false 是阻止默认事件的。再说,你放的那个位置,能阻止。再看看书吧,再写写代码吧。<!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    <style>
    #lv0{

    }
    #lv1{
    width:200px;
    height:200px;
    background-color:red;
    }
    #lv2{
    width:100px;
    height:100px;
    background-color:blue;
    }
    </style>
    </head>
    <body id='lv0'>
    <div id='lv1'>this is a test
    <div id='lv2'>lv2</div>
    </div><script>
    function $(id){
    return document.getElementById(id);
    }
    $('lv0').onclick = function(e){

    }
    $('lv1').onclick = function(e){

    }
    $('lv2').onclick = function(e){
    e.preventDefault();
    e.stopPropagation();
    }</script></body>
    </html>
      

  2.   

    楼上正解,我再补充两句
    有人认为 return false = stopPropagation() + preventDefault(), 其实是错的. 
    return false 不但阻止事件, 还可以返回对象, 跳出循环等… 方便地一刀切而不够灵活, 滥用易出错.
    但是不要滥用他,尤其是在复杂的页面时,你会被这个return false搞疯的
      

  3.   

    楼主,label有个for属性的,可以减少你的烦恼,请看示例代码:
    <!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" />
    <title>无标题文档</title>
    <script src="jquery-ui-1.10.4.custom/js/jquery-1.10.2.js"></script>
    </head><body>
    <ul>
    <li >
    <input  type="radio" name="financingType" id="financingType" value="00101" />
    <label id="label1" for="financingType">项目融资</label>
    </li>
    <li >
    <input  type="radio" name="financingType" id="financingType2" value="00102" />
    <label id="label1" for="financingType2">项目融资222</label>
    </li>
    </ul>
    <script>
    $(function(){
    $("[name='financingType']").click(function(){
    alert("value:"+$(this).val());
    });
    });
    </script>
    </body>
    </html>