if($(this).find("Dimension1").text()) is blank
display nothing
else if ($(this).find("Dimension1").text()) has a value
put a "x" before printing $(this).find("Dimension1").text()
所以它将是 "x"+ Dimension1
我怎么用javascript写这个
最佳答案
str= $(this).find("Dimension1").text();
if (str!="")
str = "x"+str;
关于javascript - 检查字符串以查看其是否为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9359197/