How to get value js website module in odoo?

时间:2018-07-24 10:06:24

标签: javascript web odoo

I want if note field have value, make alert. My code is:

odoo.define('website_sale_product_list.product', function (require) {
    "use strict";
    var ajax = require('web.ajax');
    $(window).load(function(){
      console.log('dg');
       var note = $('#note').val();
       console.log(note + '        note');
       var comment = document.getElementById("note").value;
       if( comment != null && comment != undefined) {
            alert(comment);
        }
        else {
            alert(comment + '       0');
        }

   });
});

Note value is undefined. Help, i need any solution?

0 个答案:

没有答案