Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经将数据类型 int 赋予模型中的 ID,现在当我调用 javascript 来提醒它时,它不显示任何结果,而是显示 [object object]。我想显示该 ID 的值。任何提示都会有所帮助
try this: $(function () { $('form').submit(function () { $.ajax({ url: this.action, type: this.method, success: function (result) { $('#elementid').html(result); } }); return false; }); }); $('#elementid').html(result)
为您提供价值而不是 [object object]。