如何启用文本框页面加载上的提交按钮

时间:2018-09-01 08:48:55

标签: php codeigniter

我想在文本框值大于0时启用我的提交按钮。此文本框不是可编辑的项目。此文本框会由某些功能自动填充。

Sub Find_Text_withList_in_table()
    Dim rngFind As Word.Range, rngFigureList As Word.Range
    Dim lstParas As Word.ListParagraphs
    Dim lFindCounter As Long 'for testing / debugging

    Set rngFind = ActiveDocument.content
    rngFind.Find.ClearFormatting
    With rngFind.Find
        .Text = "figure id:"
        .Replacement.Text = ""
        .Forward = True
        .wrap = wdFindStop
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With

    Do While rngFind.Find.Execute
        lFindCounter = lFindCounter + 1
        If rngFind.Information(wdWithInTable) Then
            Debug.Print "Figure ID Found in Table"
            Set lstParas = rngFind.ListParagraphs
            If lstParas.Count > 0 Then
                Set rngFigureList = lstParas.Item(1).Range
                Set lstAllParas = rngFigureList.ListFormat.List.ListParagraphs
                Debug.Print "Nr paragraphs in the list: " & lstAllParas.Count
                rngFigureList.Start = lstAllParas(1).Range.Start
                rngFigureList.End = lstAllParas(lstAllParas.Count).Range.End
                rngFigureList.Select
                MsgBox "Figure Id is in a numbered list, in a table"
            End If
        End If
    Loop
    Debug.Print "Nr Figure ID found: " & lFindCounter
    Application.ScreenUpdating = True
End Sub

1 个答案:

答案 0 :(得分:0)

如果文本框由脚本/函数填充,则keyup事件很可能不会触发。

尝试改用jquery's change-event

但这实际上取决于如何更改脚本中的内容...