日期:2014-05-17  浏览次数:20756 次

HTML5-语音搜索框
<html>
<head>
	<script>
	function echoSpeakContent(){
		var objVal = document.getElementById('speakInput').value;
		alert(objVal);
	}
	</script>
	<title>html5-speaking</title>
</head>
	<body>
		<input x-webkit-speech x-webkit-grammar="bUIltin:search" lang="zh-CN" onwebkitspeechchange="echoSpeakContent();" id="speakInput"/>
	</body>
</html>