当前位置: 代码迷 >> HTML/CSS >> HTML5-话音搜索框
  详细解决方案

HTML5-话音搜索框

热度:156   发布时间:2013-03-14 10:33:15.0
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>