I'm not sure what is the difference between opening a JS script with
<SCRIPT language='JavaScript'>
or using:
<SCRIPT type="text/JavaScript">
If JavaScript is always quoted (either with "" or c ''), or is that not important?
Thanks for any clarification on this topic!
The language attribute was used in HTML 3.2. Introduced type HTML 4.0 (which is consistent with other elements related to external media, for example <style>), and required it. He also deprecated language.
<style>
Use type . Do not use language .
HTML ( XHTML) , ( , , ).
Javascript Code Conventions Javascript:
JavaScriptJavaScript in .js .JavaScript HTML, . HTML .< script src= filename.js > , . , script . . , script, MIME .
JavaScript
JavaScript in .js .
JavaScript HTML, . HTML .
< script src= filename.js > , . , script . . , script, MIME .
- , mimetype /javascript, .
<script language="javascript" type="text/javascript">
, .
<style type="text/css">
- - ( ) .
JavaScript type language:
<script src="script.js" />
, , . script - type = "text/javascript".
Edit:
, , Yahoo! JavaScript ( , ) -.
Google - , -. ( W3C, JavaScript ). - - , i.
. , :)
W3 HTML 4.01 , . langage , , , Microsoft Netscape.
, XHTML 1.0 ( ). , html ( HTML 4.01, XHTML 1.0).
:
("). apostraphes (').
Change . The opinion is made, it seems, here, my bad. Single quotes are technically legal, but, in my experience, they tend to lead to more problems than double quotes (they often occur among attribute values among other things), so I always recommend sticking to the latter. Your mileage may vary, though!
Source: https://habr.com/ru/post/1697335/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1697330/how-to-add-usrsharejava-libs-to-webapps-classpath&usg=ALkJrhiSm_ZjsEdyLhOZPdg_02L4uJnI5gThe Flex profiler gives a "Socket timeout" error. What for? - flexWPF and string formatting - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1697333/how-to-send-ctrl-break-from-remote-desktop-connection-client&usg=ALkJrhjuCCmJIBnK5CbjLM3xM0wsCgMcpwSilverlight XAP obfuscation - silverlightGetting information about a physical device from a given file path - windowsCreate PDF from structured data - pdfWindows Server 2008 SSTP VPN in a non-domain environment? - sslIs there a way to dump objects in memory from a running ruby process? - heapInclude only specific libraries in the operating system - c ++All Articles