获取ul中li的value值

<script>
  $(function(){
    $(".month-list").find("li").click(function(){
    var text = $(this).text();
    var value = $(this).attr("value");
    alert(text+" -- "+value);
    });
  });
</script>

posted @ 2020-08-27 13:51  coder小白  阅读(1299)  评论(0编辑  收藏  举报