By: aathishankaran in Javascript Tutorials on 2007年03月21日 [フレーム]
Netscape initially developed JavaScript under the name of LiveScript. This scripting language was intended to extend the capabilities of basic HTML and provide an alternative to using CGI scripts. After Java's popularity, Netscape followed the notation of Java - hence, the name change to JavaScript.
EXAMPLE for JavaScript embedded in an HTML file.
<html>
<head>
<title>Status Bar</title>
<script>
window.defaultStatus = "Welcome to the large URL page.";
function changeStatus() {
window.status = "Click me to go to the home page.";
}
function changeDefaultStatus() {
window.defaultStatus = document.statusForm.messageList.options[document.statusForm.messageList.selectedIndex].text;
}
</script>
</head>
<body>
<p align="center">
<font color="#008040">
<font size="7"><strong>https://www.java-samples.com</strong></font>
</font>
</p>
<p align="center">
<a href="https://www.java-samples.com" onMouseOver="changeStatus();return true;">Go...</a>
</p>
<form name="statusForm" method="POST">
<p>
<br>
<br>
<br>
<br>
</p>
<p align="center">
<font size="1">
To change the default status bar message, select a message from the list below and click the Change button.
</font>
</p>
<p align="center">
<select name="messageList" size="1">
<option selected>Welcome to the large URL page.</option>
<option>On route to Java Samples</option>
<option>This page intentionally left (nearly) blank.</option>
<option>An exciting example of changing status bar text.</option>
</select>
<input type="button" onClick="changeDefaultStatus();" value="Change">
</p>
</form>
</body>
</html> This policy contains information about your privacy. By posting, you are declaring that you understand this policy:
This policy is subject to change at any time and without notice.
These terms and conditions contain rules about posting comments. By submitting a comment, you are declaring that you agree with these rules:
Failure to comply with these rules may result in being banned from submitting further comments.
These terms and conditions are subject to change at any time and without notice.
Most Viewed Articles (in Javascript )
Dynamically modify the option set in Dynamics 365 forms
promise and .then() in JavaScript
reduce() and filter() in JavaScript
History and evolution of Javascript
Using parseInt() and parseFloat() in JavaScript to convert data types to Numbers
Show how many characters remaining in a html text box using javascript
Latest Articles (in Javascript)
© 2023 Java-samples.com
Tutorial Archive: Data Science React Native Android AJAX ASP.net C C++ C# Cocoa Cloud Computing EJB Errors Java Certification Interview iPhone Javascript JSF JSP Java Beans J2ME JDBC Linux Mac OS X MySQL Perl PHP Python Ruby SAP VB.net EJB Struts Trends WebServices XML Office 365 Hibernate
Latest Tutorials on: Data Science React Native Android AJAX ASP.net C Cocoa C++ C# EJB Errors Java Certification Interview iPhone Javascript JSF JSP Java Beans J2ME JDBC Linux Mac OS X MySQL Perl PHP Python Ruby SAP VB.net EJB Struts Cloud Computing WebServices XML Office 365 Hibernate