DOM操作 045

本文深入讲解了DOM(文档对象模型)的基本概念与操作方法,包括获取DOM元素的各种方式,如通过ID、标签名、类名等,以及如何利用JS进行元素的值、样式、属性的修改,展示了丰富的代码实例。

DOM操作 045

一 什么是DOM


 

  DOM : 文档对象模型 它为文档提供了结构化表示 并定义了如何通过脚本来访问文档结构 . 目的就是为了能让js操作HTML元素而制定的一个规范 . 

  DOM树(一切都是节点): 

    元素节点 : HTML标签

    文本节点 : 标签中的文字(比如标签之间的空格 换行)

    属性节点 : 标签的属性

  DOM可以做什么 : 找对象(元素节点)  设置对象的值  设置元素的样式 动他创建和删除元素  事件的触发响应 : 事件源 事件 事件的驱动程序 

  获取DOM的方式:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div class="box" id="box">
        <p>alex</p>
    </div>
    <p class="box">吴老板</p>

    <script type="text/javascript">
        console.log(window);
        console.dir(document);
        console.log(document.documentElement);
        console.log(document.body)
        //1.通过id获取
        var oDiv = document.getElementById('box');
        console.log(oDiv);
    //    2.通过标签获取 获取是伪数组 多个DOM对象
        var oTag = document.getElementsByTagName('div')[0]; //HTMLCollection 伪数组 有数组的索引和length,但是没有数组的方法
        console.log(oTag);
        oTag.style.color = 'red';
    //    3.通过类名获取 获取的也是伪数组 多个DOM对象
        var oActives = document.getElementsByClassName('box');
        console.log(oActives);
        for(var i = 0; i < oActives.length; i ++){
            //样式设置
            oActives[i].style.backgroundColor = 'green';
        }
        //救命稻草

        var oD = document.querySelectorAll('div p')
        console.log(oD);

        oD.forEach(function (item,index) {
            console.log(item);
        })


    </script>

</body>
</html>

 

二 DOM中的操作:

  1 js对值的处理:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="box">
        wusir
        <p>alex</p>
    </div>
    <input type="text" value="" id="user">
    <script>
        var oDiv = document.getElementById('box');
        // oDiv.innerText= '<h1>哈哈哈哈</h1>';
        // oDiv.innerHTML = '嘿嘿嘿嘿';
        // oDiv.innerHTML = '<h3>嘿嘿嘿</h3>'

        //只获取所有(当前标签和子标签)文本内容
        // console.log(oDiv.innerText);
        //获取父标签中所有的标签元素 (子标签,空格,换行,文本)
        console.log(oDiv.innerHTML);
        //设置value值  只适用于表单控件元素
        document.getElementById('user').value = 'alex';
        console.log(document.getElementById('user').value);
    </script>

</body>
</html>

  2 对 css 的操作:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .box {
            width: 200px;
            height: 300px;
            background-color: red;
        }
    </style>
</head>
<body>
<div class="box"></div>
<script>
    var oDiv = document.getElementsByClassName('box')[0];

    var isRed = true;
    oDiv.onclick = function () {
        if (isRed) {
            console.log(this.style);
            //this  谁做的事件操作 this指向谁
            this.style.backgroundColor = 'green';
            this.style.width = '400px';
            isRed = false;
        } else {
            this.style.backgroundColor = 'red';
            isRed = true;
        }

    }
</script>

</body>

  3 对标签属性操作:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .box {
            width: 200px;
            height: 300px;
            background-color: red;
        }

        #box {
            background-color: yellow;
        }

        .active {
            display: none;
        }
    </style>
</head>
<body>
<button id="btn">切换</button>
<div class="box"></div>
<script>
    var oDiv = document.getElementsByClassName('box')[0];
    var oBtn = document.getElementById('btn');
    var isShow = true;
    //不等待
    oBtn.onclick = function () {
        if (isShow) {
            //   对id 对标签赋值id
            // oDiv.id = 'box';
            // oDiv.title = '哈哈哈';
            // console.log(oDiv.className); //box
            //设置类名的时候 一定要用className 因为class是个关键字
            oDiv.className = oDiv.className + ' active';
            isShow = false;
        }else{
             oDiv.className = 'box';
            isShow = true;
        }

    }
    console.log(11111);

</script>

</body>
</html>

  4 .img标签属性的操作:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        /*重置样式*/
        *{
            padding: 0;
            margin: 0;
        }
        .swiper{
            width: 1000px;
            height: 460px;
            margin: 0 auto;
            background-color: red;
            position: relative;
        }
        .swiper span{
            position: absolute;
            right: 0;
            top: 50%;
            width: 41px;
            height: 69px;
            background: green url("./icon-slides.png") no-repeat -125px 0;
        }
    </style>
</head>
<body>
    <div class="swiper">
        <span id="next"></span>
        <img src="./1.png" alt="" id="meinv">
    </div>
    <script>
        var oImg = document.getElementById('meinv');
        console.dir(oImg);
        var oNext = document.getElementById('next');
        oImg.onmouseover = function () {
            //this.src 获取的是DOM对象的属性
            //console.log(this.src); //绝对路径
            //获取出来的就是标签上的属性 通过getAttribute('');获取的标签上的属性
            console.log(this.getAttribute('src'));
            this.src = '1_hover.png';
            this.alt = '哈哈哈'
        }
        oImg.onmouseout = function () {
            this.src = '1.png'
            //console.log(this.getAttribute('src'))
        }
        oNext.onmouseover = function () {
            // console.log( this.style);
            this.style.backgroundPositionX = '-42px';
            this.style.backgroundPositionY = '0';
        }
    </script>
</body>
</html>

  5 .属性方法设置和获取

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="box">alex</div>
    <script>
        // document.getElementsByTagName('div')[0].setAttribute()
    </script>

</body>
</html>

  6 .对象属性和标签属性区分

 
# 区分DOM对象属性 和 标签属性
//this.src 获取的是DOM对象的属性
console.log(this.src); //绝对路径
//获取出来的就是标签上的属性 通过getAttribute('');获取的标签上的属性
console.log(this.getAttribute('src'));
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="text" name="user" id="user">
<img src="./1.png" alt="" id="aImg"><input type="radio" name="sex" checked="xxxxx" id="nan"><input type="radio" name="sex" id="nv">
<script>

    function  $(idName) {

        return document.getElementById(idName);
    }

    var oInput = document.getElementById('user');
    var oImg = document.getElementById('aImg');

    console.dir(oInput);//DOM对象
    console.log(oInput.type);
    console.log(oInput.getAttribute('type'));


    console.dir(oImg);
    console.log(oImg.src);
    console.log(oImg.getAttribute('src'));

    console.log(  $('nan').checked); //对象的属性   单选框 提交后台 建议使用对象属性checked
    console.log(  $('nan').getAttribute('checked')); //标签上属性
</script>

</body>
</html>
View Code

 

    

posted @ 2018-11-25 19:20 你没有想象的那么重要 阅读( ...) 评论( ...) 编辑 收藏
[ERROR] Failed to execute goal com.huawei.dt:dt4j-coverage-maven-plugin:2.2.2:instrument (instrument) on project yalu-portal-parent: Execution instrument of goal com.huawei.dt:dt4j-coverage-maven-plugin:2.2.2:instrument failed: Unable to load the mojo 'instrument' in the plugin 'com.huawei.dt:dt4j-coverage-maven-plugin:2.2.2' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com/huawei/dt4j/plugin/coverage/InstrumentMojo has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0 [2025/12/02 11:36:53.043 GMT+08:00] [ERROR] ----------------------------------------------------- [2025/12/02 11:36:53.043 GMT+08:00] [ERROR] realm = plugin>com.huawei.dt:dt4j-coverage-maven-plugin:2.2.2 [2025/12/02 11:36:53.043 GMT+08:00] [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [2025/12/02 11:36:53.043 GMT+08:00] [ERROR] urls[0] = file:/devcloud/cache/maven_repo/com/huawei/dt/dt4j-coverage-maven-plugin/2.2.2/dt4j-coverage-maven-plugin-2.2.2.jar [2025/12/02 11:36:53.043 GMT+08:00] [ERROR] urls[1] = file:/devcloud/cache/maven_repo/com/huawei/dt/dt4j-coverage-reporter/2.2.2/dt4j-coverage-reporter-2.2.2.jar [2025/12/02 11:36:53.043 GMT+08:00] [ERROR] urls[2] = file:/devcloud/cache/maven_repo/org/apache/commons/commons-compress/1.26.0/commons-compress-1.26.0.jar [2025/12/02 11:36:53.043 GMT+08:00] [ERROR] urls[3] = file:/devcloud/cache/maven_repo/com/huaweicloud/esdk-obs-java/3.24.3/esdk-obs-java-3.24.3.jar [2025/12/02 11:36:53.043 GMT+08:00] [ERROR] urls[4] = file:/devcloud/cache/maven_repo/com/squareup/okio/okio/3.6.0/okio-3.6.0.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[5] = file:/devcloud/cache/maven_repo/com/squareup/okio/okio-jvm/3.6.0/okio-jvm-3.6.0.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[6] = file:/devcloud/cache/maven_repo/org/jetbrains/kotlin/kotlin-stdlib-common/1.9.10/kotlin-stdlib-common-1.9.10.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[7] = file:/devcloud/cache/maven_repo/com/fasterxml/jackson/core/jackson-core/2.15.2/jackson-core-2.15.2.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[8] = file:/devcloud/cache/maven_repo/com/fasterxml/jackson/core/jackson-annotations/2.15.2/jackson-annotations-2.15.2.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[9] = file:/devcloud/cache/maven_repo/org/apache/logging/log4j/log4j-core/2.18.0/log4j-core-2.18.0.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[10] = file:/devcloud/cache/maven_repo/org/apache/logging/log4j/log4j-api/2.18.0/log4j-api-2.18.0.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[11] = file:/devcloud/cache/maven_repo/com/squareup/okhttp3/okhttp/4.12.0/okhttp-4.12.0.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[12] = file:/devcloud/cache/maven_repo/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.8.21/kotlin-stdlib-jdk8-1.8.21.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[13] = file:/devcloud/cache/maven_repo/org/jetbrains/kotlin/kotlin-stdlib/1.8.21/kotlin-stdlib-1.8.21.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[14] = file:/devcloud/cache/maven_repo/org/jetbrains/annotations/13.0/annotations-13.0.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[15] = file:/devcloud/cache/maven_repo/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.8.21/kotlin-stdlib-jdk7-1.8.21.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[16] = file:/devcloud/cache/maven_repo/org/jsoup/jsoup/1.18.1/jsoup-1.18.1.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[17] = file:/devcloud/cache/maven_repo/org/apache/commons/commons-lang3/3.13.0/commons-lang3-3.13.0.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[18] = file:/devcloud/cache/maven_repo/org/slf4j/slf4j-simple/1.7.36/slf4j-simple-1.7.36.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[19] = file:/devcloud/cache/maven_repo/org/apache/commons/commons-collections4/4.4/commons-collections4-4.4.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[20] = file:/devcloud/cache/maven_repo/com/huawei/dt/dt4j-operation/2.2.2/dt4j-operation-2.2.2.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[21] = file:/devcloud/cache/maven_repo/jakarta/servlet/jakarta.servlet-api/6.0.0/jakarta.servlet-api-6.0.0.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[22] = file:/devcloud/cache/maven_repo/org/apache/httpcomponents/httpclient/4.5.14/httpclient-4.5.14.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[23] = file:/devcloud/cache/maven_repo/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[24] = file:/devcloud/cache/maven_repo/commons-logging/commons-logging/1.2/commons-logging-1.2.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[25] = file:/devcloud/cache/maven_repo/commons-codec/commons-codec/1.11/commons-codec-1.11.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[26] = file:/devcloud/cache/maven_repo/com/fasterxml/jackson/core/jackson-databind/2.15.2/jackson-databind-2.15.2.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[27] = file:/devcloud/cache/maven_repo/jakarta/inject/jakarta.inject-api/2.0.1/jakarta.inject-api-2.0.1.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[28] = file:/devcloud/cache/maven_repo/org/codehaus/plexus/plexus-utils/3.3.1/plexus-utils-3.3.1.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[29] = file:/devcloud/cache/maven_repo/org/codehaus/plexus/plexus-sec-dispatcher/2.0/plexus-sec-dispatcher-2.0.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[30] = file:/devcloud/cache/maven_repo/org/codehaus/plexus/plexus-cipher/2.0/plexus-cipher-2.0.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[31] = file:/devcloud/cache/maven_repo/org/apache/maven/maven-builder-support/3.8.8/maven-builder-support-3.8.8.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[32] = file:/devcloud/cache/maven_repo/org/apache/maven/shared/maven-shared-utils/3.3.4/maven-shared-utils-3.3.4.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[33] = file:/devcloud/cache/maven_repo/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.5/org.eclipse.sisu.inject-0.3.5.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[34] = file:/devcloud/cache/maven_repo/com/google/inject/guice/4.2.2/guice-4.2.2-no_aop.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[35] = file:/devcloud/cache/maven_repo/aopalliance/aopalliance/1.0/aopalliance-1.0.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[36] = file:/devcloud/cache/maven_repo/com/google/guava/guava/25.1-android/guava-25.1-android.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[37] = file:/devcloud/cache/maven_repo/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[38] = file:/devcloud/cache/maven_repo/org/checkerframework/checker-compat-qual/2.0.0/checker-compat-qual-2.0.0.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[39] = file:/devcloud/cache/maven_repo/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[40] = file:/devcloud/cache/maven_repo/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[41] = file:/devcloud/cache/maven_repo/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[42] = file:/devcloud/cache/maven_repo/org/codehaus/plexus/plexus-interpolation/1.26/plexus-interpolation-1.26.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[43] = file:/devcloud/cache/maven_repo/org/codehaus/plexus/plexus-component-annotations/2.1.0/plexus-component-annotations-2.1.0.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[44] = file:/devcloud/cache/maven_repo/org/springframework/spring-core/6.1.1/spring-core-6.1.1.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[45] = file:/devcloud/cache/maven_repo/org/springframework/spring-jcl/6.1.1/spring-jcl-6.1.1.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[46] = file:/devcloud/cache/maven_repo/commons-io/commons-io/2.13.0/commons-io-2.13.0.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[47] = file:/devcloud/cache/maven_repo/org/jacoco/jacoco-maven-plugin/0.8.11/jacoco-maven-plugin-0.8.11.jar [2025/12/02 11:36:53.044 GMT+08:00] [ERROR] urls[48] = file:/devcloud/cache/maven_repo/org/apache/maven/shared/file-management/3.1.0/file-management-3.1.0.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[49] = file:/devcloud/cache/maven_repo/org/apache/maven/reporting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[50] = file:/devcloud/cache/maven_repo/org/apache/maven/doxia/doxia-sink-api/1.0/doxia-sink-api-1.0.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[51] = file:/devcloud/cache/maven_repo/org/jacoco/org.jacoco.core/0.8.11/org.jacoco.core-0.8.11.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[52] = file:/devcloud/cache/maven_repo/org/ow2/asm/asm/9.6/asm-9.6.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[53] = file:/devcloud/cache/maven_repo/org/ow2/asm/asm-commons/9.6/asm-commons-9.6.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[54] = file:/devcloud/cache/maven_repo/org/ow2/asm/asm-tree/9.6/asm-tree-9.6.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[55] = file:/devcloud/cache/maven_repo/org/jacoco/org.jacoco.report/0.8.11/org.jacoco.report-0.8.11.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[56] = file:/devcloud/cache/maven_repo/org/dom4j/dom4j/2.1.4/dom4j-2.1.4.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[57] = file:/devcloud/cache/maven_repo/com/alibaba/fastjson/1.2.83/fastjson-1.2.83.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[58] = file:/devcloud/cache/maven_repo/org/apache/maven/plugins/maven-scm-plugin/1.11.2/maven-scm-plugin-1.11.2.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[59] = file:/devcloud/cache/maven_repo/junit/junit/3.8.1/junit-3.8.1.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[60] = file:/devcloud/cache/maven_repo/org/apache/maven/scm/maven-scm-*****-plexus/1.11.2/maven-scm-*****-plexus-1.11.2.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[61] = file:/devcloud/cache/maven_repo/org/apache/maven/scm/maven-scm-providers-standard/1.11.2/maven-scm-providers-standard-1.11.2.pom [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[62] = file:/devcloud/cache/maven_repo/org/apache/maven/scm/maven-scm-provider-gitexe/1.11.2/maven-scm-provider-gitexe-1.11.2.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[63] = file:/devcloud/cache/maven_repo/commons-lang/commons-lang/2.6/commons-lang-2.6.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[64] = file:/devcloud/cache/maven_repo/org/apache/maven/scm/maven-scm-provider-local/1.11.2/maven-scm-provider-local-1.11.2.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[65] = file:/devcloud/cache/maven_repo/org/apache/maven/scm/maven-scm-provider-svn-commons/1.11.2/maven-scm-provider-svn-commons-1.11.2.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[66] = file:/devcloud/cache/maven_repo/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[67] = file:/devcloud/cache/maven_repo/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[68] = file:/devcloud/cache/maven_repo/org/apache/maven/scm/maven-scm-provider-jgit/1.11.2/maven-scm-provider-jgit-1.11.2.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[69] = file:/devcloud/cache/maven_repo/org/apache/maven/scm/maven-scm-provider-git-commons/1.11.2/maven-scm-provider-git-commons-1.11.2.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[70] = file:/devcloud/cache/maven_repo/org/eclipse/jgit/org.eclipse.jgit/4.5.4.201711221230-r/org.eclipse.jgit-4.5.4.201711221230-r.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[71] = file:/devcloud/cache/maven_repo/com/jcraft/jsch/0.1.53/jsch-0.1.53.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[72] = file:/devcloud/cache/maven_repo/com/googlecode/javaewah/JavaEWAH/0.7.9/JavaEWAH-0.7.9.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[73] = file:/devcloud/cache/maven_repo/org/apache/maven/scm/maven-scm-api/1.11.2/maven-scm-api-1.11.2.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[74] = file:/devcloud/cache/maven_repo/com/google/code/gson/gson/2.10/gson-2.10.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[75] = file:/devcloud/cache/maven_repo/io/github/java-diff-utils/java-diff-utils-jgit/4.12/java-diff-utils-jgit-4.12.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[76] = file:/devcloud/cache/maven_repo/io/github/java-diff-utils/java-diff-utils/4.12/java-diff-utils-4.12.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[77] = file:/devcloud/cache/maven_repo/com/github/javaparser/javaparser-core/3.25.3/javaparser-core-3.25.3.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[78] = file:/devcloud/cache/maven_repo/org/pitest/pitest-maven/1.15.8/pitest-maven-1.15.8.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[79] = file:/devcloud/cache/maven_repo/org/pitest/pitest-entry/1.15.8/pitest-entry-1.15.8.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[80] = file:/devcloud/cache/maven_repo/org/pitest/pitest/1.15.8/pitest-1.15.8.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[81] = file:/devcloud/cache/maven_repo/org/apache/commons/commons-text/1.10.0/commons-text-1.10.0.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[82] = file:/devcloud/cache/maven_repo/org/pitest/pitest-aggregator/1.15.8/pitest-aggregator-1.15.8.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[83] = file:/devcloud/cache/maven_repo/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.13.3/jackson-dataformat-xml-2.13.3.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[84] = file:/devcloud/cache/maven_repo/org/codehaus/woodstox/stax2-api/4.2.1/stax2-api-4.2.1.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[85] = file:/devcloud/cache/maven_repo/com/fasterxml/woodstox/woodstox-core/6.2.7/woodstox-core-6.2.7.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[86] = file:/devcloud/cache/maven_repo/commons-beanutils/commons-beanutils/1.9.4/commons-beanutils-1.9.4.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[87] = file:/devcloud/cache/maven_repo/org/apache/maven/reporting/maven-reporting-impl/3.1.0/maven-reporting-impl-3.1.0.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[88] = file:/devcloud/cache/maven_repo/org/apache/maven/doxia/doxia-decoration-model/1.11.1/doxia-decoration-model-1.11.1.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[89] = file:/devcloud/cache/maven_repo/org/apache/maven/doxia/doxia-core/1.11.1/doxia-core-1.11.1.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[90] = file:/devcloud/cache/maven_repo/org/apache/maven/doxia/doxia-logging-api/1.11.1/doxia-logging-api-1.11.1.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[91] = file:/devcloud/cache/maven_repo/org/apache/maven/doxia/doxia-site-renderer/1.11.1/doxia-site-renderer-1.11.1.jar [2025/12/02 11:36:53.045 GMT+08:00] [ERROR] urls[92] = file:/devcloud/cache/maven_repo/org/apache/maven/doxia/doxia-skin-model/1.11.1/doxia-skin-model-1.11.1.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[93] = file:/devcloud/cache/maven_repo/org/apache/maven/doxia/doxia-module-xhtml/1.11.1/doxia-module-xhtml-1.11.1.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[94] = file:/devcloud/cache/maven_repo/org/apache/maven/doxia/doxia-module-xhtml5/1.11.1/doxia-module-xhtml5-1.11.1.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[95] = file:/devcloud/cache/maven_repo/org/codehaus/plexus/plexus-i18n/1.0-beta-10/plexus-i18n-1.0-beta-10.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[96] = file:/devcloud/cache/maven_repo/org/codehaus/plexus/plexus-velocity/1.2/plexus-velocity-1.2.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[97] = file:/devcloud/cache/maven_repo/org/apache/velocity/velocity/1.7/velocity-1.7.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[98] = file:/devcloud/cache/maven_repo/org/apache/velocity/velocity-tools/2.0/velocity-tools-2.0.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[99] = file:/devcloud/cache/maven_repo/commons-digester/commons-digester/1.8/commons-digester-1.8.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[100] = file:/devcloud/cache/maven_repo/commons-chain/commons-chain/1.1/commons-chain-1.1.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[101] = file:/devcloud/cache/maven_repo/dom4j/dom4j/1.1/dom4j-1.1.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[102] = file:/devcloud/cache/maven_repo/oro/oro/2.0.8/oro-2.0.8.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[103] = file:/devcloud/cache/maven_repo/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[104] = file:/devcloud/cache/maven_repo/org/codehaus/groovy/groovy-all/2.4.18/groovy-all-2.4.18.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[105] = file:/devcloud/cache/maven_repo/org/apache/maven/surefire/surefire-booter/3.0.0-M7/surefire-booter-3.0.0-M7.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[106] = file:/devcloud/cache/maven_repo/org/apache/maven/surefire/surefire-api/3.0.0-M7/surefire-api-3.0.0-M7.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[107] = file:/devcloud/cache/maven_repo/org/apache/maven/surefire/surefire-logger-api/3.0.0-M7/surefire-logger-api-3.0.0-M7.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[108] = file:/devcloud/cache/maven_repo/org/apache/maven/surefire/surefire-extensions-spi/3.0.0-M7/surefire-extensions-spi-3.0.0-M7.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[109] = file:/devcloud/cache/maven_repo/org/apache/maven/surefire/maven-surefire-common/3.0.0-M7/maven-surefire-common-3.0.0-M7.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[110] = file:/devcloud/cache/maven_repo/org/apache/maven/surefire/surefire-extensions-api/3.0.0-M7/surefire-extensions-api-3.0.0-M7.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[111] = file:/devcloud/cache/maven_repo/org/apache/maven/shared/maven-common-artifact-filters/3.1.1/maven-common-artifact-filters-3.1.1.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[112] = file:/devcloud/cache/maven_repo/org/codehaus/plexus/plexus-java/1.1.1/plexus-java-1.1.1.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[113] = file:/devcloud/cache/maven_repo/com/thoughtworks/qdox/qdox/2.0.1/qdox-2.0.1.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[114] = file:/devcloud/cache/maven_repo/org/apache/maven/surefire/surefire-shared-utils/3.0.0-M7/surefire-shared-utils-3.0.0-M7.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[115] = file:/devcloud/cache/maven_repo/org/slf4j/jul-to-slf4j/1.7.12/jul-to-slf4j-1.7.12.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[116] = file:/devcloud/cache/maven_repo/uk/org/lidalia/sysout-over-slf4j/1.0.2/sysout-over-slf4j-1.0.2.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[117] = file:/devcloud/cache/maven_repo/org/antlr/ST4/4.3.4/ST4-4.3.4.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[118] = file:/devcloud/cache/maven_repo/org/antlr/antlr-runtime/3.5.3/antlr-runtime-3.5.3.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] urls[119] = file:/devcloud/cache/maven_repo/org/jacoco/org.jacoco.agent/0.8.11/org.jacoco.agent-0.8.11-runtime.jar [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] Number of foreign imports: 1 [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]] [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] ----------------------------------------------------- [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] -> [Help 1] [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] For more information about the errors and possible solutions, please read the following articles: [2025/12/02 11:36:53.046 GMT+08:00] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException [2025/12/02 11:36:53.055 GMT+08:00] [ERROR] [BUILD:build_execute] : script returned exit code 1, exitMessage: command run failed [2025/12/02 11:36:53.591 GMT+08:00] [ERROR] [BUILD:build_execute] : Error message is empty [2025/12/02 11:36:53.592 GMT+08:00] [ERROR] [BUILD:build_execute] : Failed to complete this step
12-03
代码下载地址: https://pan.quark.cn/s/bc087ffa872a "测控电路课后习题详解"文件.pdf是一份极具价值的学术资料,其中系统地阐述了测控电路的基础理论、系统构造、核心特性及其实际应用领域。 以下是对该文献的深入解读和系统梳理:1.1测控电路在测控系统中的核心功能测控电路在测控系统的整体架构中扮演着不可或缺的角色。 它承担着对传感器输出信号进行放大、滤除杂音、提取有效信息等关键任务,并且依据测量与控制的需求,执行必要的计算、处理与变换操作,最终输出能够驱动执行机构运作的指令信号。 测控电路作为测控系统中最具可塑性的部分,具备易于放大信号、转换模式、传输数据以及适应多样化应用场景的优势。 1.2决定测控电路精确度的关键要素影响测控电路精确度的核心要素包括:(1)噪声与干扰的存在;(2)失调现象与漂移效应,尤其是温度引起的漂移;(3)线性表现与保真度水平;(4)输入输出阻抗的特性影响。 在这些要素中,噪声干扰与失调漂移(含温度效应)是最为关键的因素,需要给予高度关注。 1.3测控电路的适应性表现测控电路在测控系统中展现出高度的适应性,具体表现在:* 具备选择特定信号、灵活实施各类转换以及进行信号处理与运算的能力* 实现模数转换与数模转换功能* 在直流与交流、电压与电流信号之间进行灵活转换* 在幅值、相位、频率与脉宽信号等不同参数间进行转换* 实现量程调整功能* 对信号实施多样化的处理与运算,如计算平均值、差值、峰值、绝对值,进行求导数、积分运算等,以及实现非线性环节的线性化处理、逻辑判断等操作1.4测量电路输入信号类型对电路结构设计的影响测量电路的输入信号类型对其电路结构设计产生显著影响。 依据传感器的类型差异,输入信号的形态也呈现多样性。 主要可分为...
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值