zoukankan      html  css  js  c++  java
  • JQuery使用笔记

    1.选择器

      id选择器:  $('#btnShow')

      class选择器:  $('.banner')

      tag选择器:  $('input')

    2.常用方法

      取 / 设value: $('#btnShow').val()  / $('#btnShow').val('sss')

      取 / 设text:  $('#btnShow').text() /  $('#btnShow').text('sss')

      取 / 设innerHtml  $('#btnShow').html() /  $('#btnShow').html('sss')

      取 / 设style  $('#btnShow').css('color') /  $('#btnShow').css('color', 'red')

      取 / 设attrbute   $('#btnShow').attr('name') /  $('#btnShow').attr('name', 'sss')

    3.ajax

      $.get(url, function(returnData) {

      //do something

      });

      $.post(url, {name:'aaa', account: 'hehe'}, function(returnData) {

      //do something

      });

  • 相关阅读:
    键盘快捷键
    电脑命令行命令
    网络基础TCP/IP
    运算符优先级
    元字符汇总
    正则表达式
    模板语法(DOM与Vue数据绑定)
    computed、methods、watch
    vue实例
    坐标轴
  • 原文地址:https://www.cnblogs.com/gz-fenglang/p/7760755.html
Copyright © 2011-2022 走看看