Matching jquery .text() to  

前端 未结 2 1327
不思量自难忘°
不思量自难忘° 2021-02-07 08:34

Due to circumstances out of my control, SharePoint, I have the following piece of code.

var item = $(\' <         


        
2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-07 09:30

    Try checking for '\xa0' (which is the character created by  ):

    var item = $(" ").text();
    alert("'" + item + "' " + (item == '\xa0'));
    

    http://jsfiddle.net/hUBeP/3/

提交回复
热议问题