Category Archives: JavaScript

JavaScript examples

1,477 views

Links too close together Mobile friendly page

Try set bigger line-height of links and font size for example: /*in css*/ .links{ line-height: 48px; font-size: 20px; background-color: rgb(255,204,0); }   /* in html page set class of link*/ <a class="links" href="m.mydomen.com/mypage.html">Blah blah mypage</a>   // or in css … Continue reading

Posted in Android Examples Code, JavaScript | Tagged , | Comments Off on Links too close together Mobile friendly page
2,382 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 | Tagged | Comments Off on Select Get Selected Item JavaScript Html Example
2,949 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 | Tagged , | Comments Off on Timer JavaScript Example Code