javascript
Brief description  about Online courses   join in Online courses
View Sathvik Reddy Chaganti 's Profile

about my assignment on Conditional Statements

Sir,i am unable to write code to detect browser using conditional statements so please help me in doing that sir.
Asked by Sathvik Reddy Chaganti | Aug 20, 2012 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Koushik,

Check this below code for detecting browser infomation.

<script lang="javascript">
detectbrowser=confirm("Display your browser information?")
if (detectbrowser == true) {
alert("Browser Information = " + navigator.userAgent)
document.write(navigator.userAgent)
}
</script>
Aug 21, 2012