当前位置:   article > 正文

中文语音朗读网站_阅读app朗读引擎url链接

阅读app朗读引擎url链接

预览地址:https://yubin.applinzi.com
预览图片:
在这里插入图片描述
详细代码:

<!DOCTYPE html>
<html>
<head>
    <title>myweb</title>
    <style>
        html{
            height: 100%;
           	background:url(https://cdn.nlark.com/yuque/0/2019/jpeg/124897/1558635287060-assets/web-upload/074f3bf7-9354-464a-985a-282167e3d212.jpeg);
			background-size:100% 100%;
			background-repeat:no-repeat;
        }

        div{
            width: 300px;         
            margin: 100px auto 0;
        }

        .input_box{
            width: 100%;
            height: 100px;
            outline: none; /*去掉轮廓线*/
            border: 10px solid #000;
            box-sizing: border-box;/*怪异盒模型*/
            resize: none;/*禁止拖拽*/
            border-radius: 20px;/*圆角*/
            padding: 20px;
            background-color: rgba(255,255,255,5);
            font-size: 20px;
        }

        .speech{
            height: 55px;
            width: 100%;
            font-size: 18px;
            outline: none;
            border: none;
            background-color:#000;
            color: #fff; 
            cursor: pointer;/*鼠标样式,小手*/
            border-radius: 20px;
        }
        .speech:hover{/*hover伪类选择器 当鼠标滑过speech改变背景颜色*/
            background-color: #ea4c89
        }

    </style>
</head>
<body >

    <div>
        <textarea class="input_box" placeholder="请输入文字......"></textarea>
        <input class="speech" type="submit" value="立刻朗读">
    </div>

    <script>/*JavaScript代码*/
        function speeching(inputBox,speechBtn) {
            var inputBox = document.querySelector(inputBox),
                speechBtn = document.querySelector(speechBtn);

            var inputText = '';

            speechBtn.onclick = function(){
                var message = null;/*默认文本框为空*/
                var text = inputBox.value;/*接收按钮得到的值*/
                message = new SpeechSynthesisUtterance(text);/*传给message*/
                window.speechSynthesis.speak(message);/*利用电脑本身应用读取输入内容*/
            }
        }
    </script>

    <script>
        speeching('.input_box','.speech');
    </script>

</body>
</html>

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/55450
推荐阅读
相关标签
  

闽ICP备14008679号