且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Knockout 获取属性值 onClick 函数

更新时间:2022-05-25 23:53:26

您可以使用 getAttribute 函数.

You can access attribute values of a DOM using the getAttribute function.

这对你有用:

answerClick: function(c, event){
        var element = event.target;
        var qref = element.getAttribute('Qref');
        var click_id = element.id;
        return true;
    }