I'm trying to implement a function that will disable the cmdButton7
when checkbox checkMultiple
is checked. and enable it again when sum = 100
using vbscript , asp.net.
I tried the method below:
Sub disableButton()
If document.form1.Multiple.value = 1 Then
document.form1.cmdButton7.enabled = False
ElseIf sum = 100 Then
document.form1.cmdButton7.enabled = true
End If
End Sub
<input type="checkbox" name="checkMultiple" id="Multiple" onclick="disableButton">Multiple</input>
But I get this error:
object required "disableButton"
在标记中的“多个”和onclick之间添加一个空格。
<input type="checkbox" name="checkMultiple" id="Multiple" onclick="disableButton">Multiple</input>
对于此错误,字符串“ Multiple”和onclick属性之间必须有一个空格。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.