Я сталкиваюсь с проблемой, используя выбор. JS . Я делаю приложение со страницами Razor , и я не могу сбросить Select Selection
Я просто хочу удалить выбор Select , Возврат его в свое начальное состояние < /p>
$('#destino').change(function() {
var origem = "2" //$('#origem').val();
var destino = $(this).val();
if (origem && destino && origem === destino) {
console.log(origem,destino)
/*
Toast.fire({
icon: "warning",
title: "Os pontos de origem e destino devem ser diferentes."
});
*/
$('#destino').val("");
}
});< /code>
Destino
Selecione uma opção
Parceiro 1
Parceiro 2
Parceiro 3
Parceiro 4
Parceiro 5
Я сталкиваюсь с проблемой, используя выбор. JS . Я делаю приложение со страницами Razor , и я не могу сбросить Select Selection Я просто хочу удалить выбор Select , Возврат его в свое начальное состояние < /p>
[code]$('#destino').change(function() { var origem = "2" //$('#origem').val(); var destino = $(this).val(); if (origem && destino && origem === destino) { console.log(origem,destino) /* Toast.fire({ icon: "warning", title: "Os pontos de origem e destino devem ser diferentes." }); */ $('#destino').val(""); } });< /code>