Tag Archives: javascript

383 views

JS get window url javascript window location href

window.location.href Example for debuging of code if (window.location.href.indexOf(’/localhost’)!= -1){ // debug code here   }

Posted in Javascript css html | Tagged , | Comments Off on JS get window url javascript window location href
469 views

JS multi threading thread javascript example

For all browsers e.g. old IE 11 ….   <script>       var mbThreadOneRunning = false; var mbThreadOneEnded = false;   var mbThreadTwoRunning = false; var mbThreadTwoEnded = false;   // you can create more than one Thread // … Continue reading

Posted in Javascript css html | Tagged , | Comments Off on JS multi threading thread javascript example
2,552 views

Select Get Selected Item JavaScript Html Example

<select id="idSelNick"> <option value="neuveden">Neuveden</option> <option value="hlavni-mesto-praha">Hlavní město Praha</option> <option value="stredocesky">Středočeský</option> <option value="jihocesky">Jihočeský</option> <option value="plzensky">Plzeňský</option> </select>   // in script var mysel = document.getElementById(’idSelNick’); var seltxt = mysel.options[mysel.selectedIndex].text; var selval = mysel.options[mysel.selectedIndex].value;

Posted in Javascript css html | Tagged | Comments Off on Select Get Selected Item JavaScript Html Example
3,329 views

Timer JavaScript Example Code

Best of timer in JavaScript – preciseness in milisecond // global variables var _startDate = null; var _stopDate = null; var go = null; // timing   function startFC(){ _startDate = new Date(); if(go==null)timingFC(); }   timingFC(){ if(go==null){ _startDate = … Continue reading

Posted in Javascript css html | Tagged , | Comments Off on Timer JavaScript Example Code