Bootstrap单选按钮不起作用

时间:2016-08-22 23:07:39

标签: html twitter-bootstrap twitter-bootstrap-4 bootstrap-4

我正在使用Bootstrap 4中的单选按钮:

-- My isholiday function; i parameter is pointer to day of month i want to test if it is or it is not a holiday
on isholiday(i)

    -- Function global variables
    set today to current date
    set tomorrow to today + 60 * 60 * 24

    -- work with calendar app
    tell application "Calendar"
        tell calendar "Státní svátky" -- national holiday calendar in my iCloud 
            set currentEvent to every event whose start date is greater than or equal to today and start date is less than or equal to tomorrow
            return currentEvent

            -- when an event occurs it should tells me right
            if currentEvent is not {} then
                display dialog "It is not empty!"
            end if
        end tell
    end tell
end isholiday

你可以看到我在那里有onclicks。但是,当我点击它们时,没有任何反应!这是Bootstrap中的错误吗?

1 个答案:

答案 0 :(得分:2)

你可以将onclick放在标签上而不是收音机吗?我认为bootstrap使标签成为无线电触发器,而不是实际的单选按钮。

看一下风景按钮:

https://jsfiddle.net/zf7p2Lbd/

    <label class="btn btn-primary" onclick="alert('Scenery!')">
        <input type="radio" id="scenery-option" /> Scenery
    </label>