Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Scripting language Interviews:AngularJSAngularJS DeveloperChrome FrameDojoExpert Developer JavaScriptExpert JavaScript DeveloperExt CoreEXT-GWTExt-JSFront End Developer (AngularJS)JQuery DeveloperjQuery MobileJQuery ProgrammerJQuery UIMooToolsPrototype FrameworkQooxdooScriptingSencha TouchSizzle Selector EngineSWFObjectWeb Font LoaderXMLHttpRequest
Copyright © 2018. All Rights Reserved
Expert Developer JavaScript Interview Question:
How can JavaScript codes be hidden from old browsers that don't support JavaScript?
Submitted by: AdministratorFor hiding JavaScript codes from old browsers:
Add "<!-" without the quotes in the code just after the <script> tag.
Add "//->" without the quotes in the code just before the <script> tag.
Old browsers will now treat this JavaScript code as a long HTML comment. While, a browser that supports JavaScript, will take the "<!-" and "//->" as one-line comments.
Submitted by:
Add "<!-" without the quotes in the code just after the <script> tag.
Add "//->" without the quotes in the code just before the <script> tag.
Old browsers will now treat this JavaScript code as a long HTML comment. While, a browser that supports JavaScript, will take the "<!-" and "//->" as one-line comments.
Submitted by:
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.