HTML5 Speech recognition — is there a way to set what the user is expected to say dynamically? (Using custom Grammars)
问题 I am looking for a way to define what you expect the user to say in an <input> tag with the HTML 5 speech attribute set. I know that you can specify a specific grammar to use via the grammar attribute, like this: <input type="text" speech grammar="grammar.grxml" /> ( see http://lists.w3.org/Archives/Public/public-xg-htmlspeech/2011Feb/att-0020/api-draft.html ) but I was hoping for a way to make this dynamic, so that I can specify what I expect the user to say via javascript. For example, if