PageSourceSearch

https://www.ast-lab.jp/js/mailarea.js

js ast-lab.jp collected 2026-10-06 13:10:54 UTC 1,249 bytes, 42 lines download raw bytes

1$(function(){
2
3$(".message").focus(function() { // 部品がフォーカスを得たとき
4if($(this).val() == $(this).attr("defaultvalue")) { // 中身が初期値の場合
5$(this).val(""); // 中身を空にする
6$(this).css("color","#000000") // 色をブラックにする
7}
8})
9
10$(".message").blur(function() {  // 部品がフォーカスを失ったとき
11setdefault($(this)) ;
12})
13
14$(".message").show(function() { // 部品が最初に表示されたとき
15setdefault($(this)) ;
16})
17
18$("#reset1").click(function() { // リセットボタンがクリックされたとき
19$(".message").each(function() {
20$(this).val("") ;
21setdefault($(this)) ;
22})
23return false;
24})
25
26})
27
28//色をグレーにして、中身を初期値にする関数:何度も使うので関数にした
29function setdefault(obj){
30if(obj.val() == obj.attr("defaultvalue") || obj.val() == "") { // 中身が初期値、もしくは空の場合
31obj.val(obj.attr("defaultvalue")); // 中身を初期値にする
32obj.css("color","#888") // 色をグレーにする
33}
34
35$("form").submit(function() {
36	$(".message").each(function() {
37		if($(this).val() == $(this).attr("defaultvalue")) { // 中身が初期値
38			$(this).val("");
39		}
40	})
41})
42}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.