JavaScript

How to get browser name and version using JavaScript

Hi friends, In this post I am going to explain about how to get the browser name and there version using simple JavaScript function. JavaScript Code function detectBrowser(){     var N= navigator.appName;     var UA= navigator.userAgent;     var temp;     var browserVersion= UA.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);     if(browserVersion && (temp= UA.match(/version\/([\.\d]+)/i))!= null)   …

Continue Reading
JavaScript PHP Code

Code snippets of PHP and Javascript

Hi friends, this post explains about few code snippets used when we develop a web applications. Snippet 1 : Generate the random numbers with limits and those numbers shouldn’t be repeat using PHP PHP Code <?php $num=range(1,10);    shuffle($num);    for ($i=0; $i<10; $i++) {             echo $num[$i];     …

Continue Reading