jQuery实用方法(定期更新)

April 26, 2010 | tags        | views
Comments 0

$(document).ready(function(){
//jQuery获取当前点击对象的属性
    $("a").click(function (){
        alert($(this).attr("id"));    
        alert($(this).attr("href"));
    });

//遍历name 属性是 spdm 的 input 元素
$("input[name='spdm']").each(function(i){
            alert($(this).val());
        });


//
});



文章本月排行 文章本年排行
   



发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。