Javascript language

R4R® Javascript Javascript Example
(追記) (追記ここまで)
(追記) (追記ここまで)
blure() and assign() Method in JavaScript

blure() Method in JavaScript

The blur() method is used to remove focus from an element.

Example:

Take a example to loss the focus of Button.

<html>
<body>
<script language="JavaScript">
function remove_focus(){
 document.getElementById(
 "removeButton").blur();
 document.getElementById(
 "removeButton").innerText = 
 "This button lost its focus"
 ;
 alert(
 "The button lost its focus"); 
} 
</script>
<input id="removeButton" 
 type="button" 
 onclick="remove_focus();" 
 value="Input Focus" 
 onFocus="this.innerText='In focus.
	 Click me to lose focus'">
</body>
</html>

Output:

assign() Method in JavaScript

The assign() method loads a new document.

Example:

<html>
<body>
<script language="JavaScript">
 function new_doc() {
 location.assign("http://r4r.co.in/");
 }
</script>
<input type="button" value="Load new page(R4R)" onclick="new_doc();">
</body>
</html>
(追記) (追記ここまで)

Output:

(追記) (追記ここまで)
Copyright ©2021-22 r4r.co.in, all rights reserved. Theguestspost.com
Sitemap
Career
Post comment
About us
Subscription
Unsubscription

AltStyle によって変換されたページ (->オリジナル) /