<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<script type="text/javascript">
function CharToVoice()
{
var Text=document.getElementById('text').value;
var VoiceObj = new ActiveXObject("Sapi.SpVoice");
VoiceObj.Speak(Text);
}
</script>
</head>
<body>
请输入文本:<br/>
<textarea id="text"></textarea><br/><br/>
<input type="submit" value="阅读文本" onClick="CharToVoice()">
</body>
</html>仅支持IE浏览器