JS条件不工作与字符串

JS conditions not working with string

本文关键字:字符串 工作 条件 JS      更新时间:2023-09-26

我只是在做基本条件。这种情况过去了。如何?

Javascript

var colname = $(this).data('name');
if ( colname == "price" ) {
     $(this).html(parseInt(value));
}

HTML

<span class="editable editable-click" data-type="text" data-pk="27" data-name="autosmo_id" data-url="/manage/action/"> 70</span>

http://joxi.net/xAeObPDsn3Bkmy.jpg -调试器中的示例

修复。

解决方法:重启Firefox浏览器。

谢谢大家。