直接上html页面就能用
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script type="text/javascript">
function voice(){
// 语音播报
var utterThis = new window.SpeechSynthesisUtterance()
utterThis.text = "支付宝到账100元"; //播放内容按
window.speechSynthesis.speak(utterThis)
}
</script>
</head>
<body>
测试页面
<button id='test' onclick='voice()' >测试</button>
</body>
</html>
<!DOCTYPE html>
<html lan