hlzj88 当前离线
少校
dim msg,sapi msg=inputBox("输入文字","开口说话") set sapi=CreateObject("sapi.spvoice") sapi.Speak msg复制代码
评分人数
Spring 当前离线
dim msg,sapi msg = " " set sapi=CreateObject("sapi.spvoice") Do msg=inputBox("输入文字","开口说话",msg) sapi.Speak msg Loop Until msg = ""复制代码
TOP
pcl_test 当前离线
荣誉版主
<html> <head> <title>单词发音</title> <hta:application showintaskbar="no" maximizebutton="no" minimizebutton="no" scroll="no"/> <script > window.resizeTo(340, 100); var sapi=new ActiveXObject('sapi.spvoice'); function read(){ var txt = document.getElementById('txt'); var btn = document.getElementById('btn'); if(txt.value){ sapi.Speak(txt.value); btn.value = '重读'; }else txt.value = '此处输入英文单词或句子'; } function reset(t){ t.value=''; var btn = document.getElementById('btn'); btn.value = '发音'; } </script> <head> <body style="text-align:center;"> <input id="txt" type="text" style="width:200px;color:#FF0000;" value="此处输入英文单词或句子" onfocus="reset(this)"/> <input id="btn" type="button" value="发音" onclick="read();" /> </body> </html>复制代码