كيف أقوم بتضمين متغيرات جافا سكريبت داخل الرسالة؟
swal ({title: "Error!"، text: "Javascript Variable؟" type: "error"، insuranceButtonText: "Cool"})؛
var myVariable = 'Hello World';
swal({
title: "Error!",
text: myVariable,
type: "error",
confirmButtonText: "Cool"
});
@ t4t5WeirdestYetizenflow كيف يمكنني تعديل لون النص بعد تخصيص متغير له؟
jsandleraol https://sweetalert.js.org/docs/#swal -text
التعليق الأكثر فائدة
var myVariable = 'Hello World'; swal({ title: "Error!", text: myVariable, type: "error", confirmButtonText: "Cool" });