[英]How to make a form with checkboxes wo disable the other input when is checked but enable the next input de type text that follow
[英]how to disable text in input type number when you enable speech
啟用語音識別時,如何防止文本出現在數字輸入字段中?
即使我使用@media speech
並在 JS 中禁用它,它也不起作用。
HTML
<form action="">
<label for="quantity">Quantity (between 1 and 5):</label>
<input type="number" id="quantity" name="quantity" min="1" max="5">
<input type="submit">
</form>
CSS
@media speech {
[type="number"] {
speak: digits;
speak-as: spell-out;
}
}
[type="number"]{
width:200px;
height:40px;
}
Javascript
document.querySelector('#quantity').webkitSpeech = false;
使用document.querySelector('#quantity').disabled = true;
使用語音識別時禁用輸入字段
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.