2 回答
TA贡献1856条经验 获得超5个赞
您应该比较内容而不是元素。另外,不确定您要做什么:
symbol = String(symbol);
尝试
var price = document.getElementById("price");
var symbol = document.getElementById("symbol");
if (currencyy == "lbp") {
if (symbol.textContent == "$") { //compare the content
symbol.textContent = "lbp";
var text = price.textContent;
var number = parseInt(text) * 2000;
price.textContent = number;
}
}
}
TA贡献1803条经验 获得超3个赞
<ng-template [ngIf]="isStatusCode[j] === false">
<img class="list-image" (error)="changeImgSource($event)" [src]="getConfigProductImage(element['shrt-campaign-product'][0]['products']['product_images'])" height="40"
alt="productImage">
</ng-template>
<ng-template [ngIf]="isStatusCode[j] === true">
<img class="list-image" (error)="changeImgSource($event)" src="/assets/images/loader.gif" height="60" alt="noImage">
</ng-template>
添加回答
举报