举例:
    一、td
    获取值:
    $(
    $(“td”).find(“td”)[0]
    ).html()
    被赋值:
    document.getElementById(“account”).innerHTML

    $(‘#account_’+id).text()//jquery版本,id是变量,注意变量与字符串的写法
    二、input
    获取值:
    document.getElementById(“change_account”).value
    被赋值:
    document.getElementById(“change_password”).value
    $(“#change_account”).val(”dylan“); //jquery版
    三、select
    获取值:document.getElementById(“change_transactionCrawled”).value
    $(‘#change_transactionCrawled’).val();//jquery版
    被选中:
    var ops = document.getElementById(“change_transactionCrawled”).options;

    for(var i=0;i var temp = ops[i].value;
    if(temp == value)
    {
    ops[i].selected = true;
    //console.info(ops[i]);
    }
    }
    //下面是jquery版,更加简洁
    var value = $($(ipt).parent().parent().find(“td”)[5]).html();
    $(“#change_transactionCrawled”).val(value)
    ——————————-
    作者:daijiguo
    来源:CSDN
    原文:https://blog.csdn.net/daijiguo/article/details/47025955
    版权声明:本文为博主原创文章,转载请附上博文链接!