我正在使用moodle开发网站。我需要使用Text to Speech所以我使用Google TTS,而SimpleSpeak也不能使用moodle 2.7。
所以在我的页面中我有类似的东西:
<audio id="live" src="http://translate.google.com/translate_tts?tl=en&q=live"
rel="noreferrer”>
</audio>
<div>
<button onclick="document.getElementById('live').play()" >play="">
live
</button>
</div>
但每次我点击按钮它都不起作用,当我检查代码时,它给出了 无法加载资源:服务器响应状态为404(未找到)
我已经添加了rel =&#34; noreferrer&#34;。
任何人都可以帮我解决这个问题。谢谢你提前。
答案 0 :(得分:0)
我刚刚注意到你的错误。在您的代码中,您有:
rel="noreferrer”
而不是
rel="noreferrer"
您不小心错误地引用了引号。
” =/= "