簡體   English   中英

如何更改烤面包機的背景顏色和圖像?

[英]how to change background color and image of a toaster?

我想將背景顏色和圖像更改為else條件(toaster.error)

       success: function (data) {
                        if (data.message != ""){
                            toastr.success(data.message);
                        }
                        else {
                            toastr.error(data.message1);
                        }
                    }

我正在使用此代碼,我需要幫助

您需要使用 DOM 訪問該元素,可能是這樣的:

success: function (data) {
        if (data.message != ""){
            toastr.success(data.message);
            yourElementToChangeColor.classList.add('class-with-the-color')
        }else {
            toastr.error(data.message1);
        }
    }

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM