Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][JavaScript]Instrukcja warunkowa, zmiana wartości
django
post 17.01.2013, 11:38:21
Post #1





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 20.11.2012

Ostrzeżenie: (0%)
-----


  1. <a type="submit" onclick="java script:yourFunctionName();" name"save-continue-to-review" data-toggle="modal" data-target="#dialog" href="" class="btn primary btn-primary" title="Go">Go
  2.  
  3. <script type="text/javascript">
  4. function yourFunctionName(){
  5. var account_owner = document.getElementById("id_account_owner").value;
  6. var account_no = document.getElementById("id_account_number").value;
  7. if(account_no == '' || account_owner == ''){
  8.  
  9. alert("Uwaga!");
  10. }
  11. }


Jak zamiast alertu (jeśli warunek jest spełniony) usunąć wartość data-toggle="modal" lub zmienić ją na inną (np. data-toggle="x") ?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 00:21