我需要更改 javascript 对象中的值。
var wba_product = {
sku:'12ZB7',
availability:'Usually ships in 1-2 business days',
}
我想使用 javascript 更改它。
<script language="javascript" type="text/javascript>
if(wba_product.sku == '12ZB7') wba_product.availability + ' Items are charged to your credit card only when they ship. Your credit card will not be charged until the item is shipped to you. ';
</script>
但是这种语法不起作用。