PageSourceSearch

https://shibetsu-suigetsu.com/wpcms/wp-content/themes/shibetsu-suigetsu/js/jalan_search.js

js shibetsu-suigetsu.com collected 2026-10-06 07:45:21 UTC 3,455 bytes, 111 lines download raw bytes

1/*西暦プルダウン作成関数*/
2function CreateYears() {
3    var i;
4    date = new Date();
5    var nowYear = (date.getYear()<1000)?
6	 date.getYear()+1900:date.getYear();
7    var year = nowYear;
8    var optionTag;
9   
10    for( i = 0; i < 3; i++ ) {
11        if( year == nowYear ) {
12            optionTag = "<option value=\"" + year + "\" selected>" + year + "</option>\n";
13        } else {
14            optionTag = "<option value=\"" + year + "\">" + year + "</option>\n";
15        }
16        year++;
17        document.write( optionTag );
18    }
19}
20
21/*月プルダウン作成関数*/
22function CreateMonths() {
23    var i;
24    date = new Date();
25    var nowMonth = date.getMonth() + 1;
26    var optionTag;
27   
28    for( i = 1; i <= 12; i++ ) {
29        if( i == nowMonth ) {
30            optionTag = "<option value=\"" + i + "\" selected>" + i + "</option>\n";
31        } else {
32            optionTag = "<option value=\"" + i + "\">" + i + "</option>\n";
33        }
34        document.write( optionTag );
35    }
36}
37
38/*日プルダウン作成関数*/
39function CreateDays() {
40    var i;
41    date = new Date();
42    var nowDay = date.getDate() + 5; //5日後の日付を選択させる
43    var optionTag;
44   
45    for( i = 1; i <= 31; i++ ) {
46        if( i == nowDay ) {
47            optionTag = "<option value=\"" + i + "\" selected>" + i + "</option>\n";
48        } else {
49            optionTag = "<option value=\"" + i + "\">" + i + "</option>\n";
50        }
51        document.write( optionTag );
52    }
53}
54
55/*プルダウン内日付変更関数*/
56function setDay(){
57    var year = document.getElementById( "year" ).value;
58    var month = document.getElementById( "month" ).value;
59    var day = document.getElementById( "day" );
60
61    var lastday = february( year, month );
62    var itemnum = day.length;
63    if ( lastday - 1 < day.selectedIndex ) {
64        day.selectedIndex = lastday - 1;
65    }
66    day.length = lastday;
67    for ( cnt = ( itemnum + 1 ); cnt <= lastday; cnt++ ) {
68        day.options[cnt - 1].text = cnt;
69    }
70}
71
72/*2月の日付決定関数*/
73function february( year, month ){
74    var lastday = new Array( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 );
75    if ( ( (year % 4 == 0) && (year % 100 != 0) ) || ( year % 400 == 0 ) ) {
76        lastday[1] = 29;
77    }
78    return lastday[month - 1];
79}
80
81/*URLの発行処理*/
82function do_url() {
83	
84//baseURLのURLを管理画面で取得できるプラン一覧にセットする
85  var baseURL = "https://www.jhpds.net/suigetsu/uw/uwp3100/uww3101.do?yadNo=360560"
86  var stayYear = document.getElementById( "year" ).value;
87  var stayMonth = document.getElementById( "month" ).value;
88  var stayDay = document.getElementById( "day" ).value;
89  var stayCount = document.plan_search.stayCount.value;
90  var adultNum = document.plan_search.adultNum.value;
91  var roomCount = document.plan_search.roomCount.value;
92  //var mealType = document.plan_search.mealType.value;
93  //var minPrice = document.plan_search.minPrice.value;
94  //var maxPrice = document.plan_search.maxPrice.value;
95
96  var planURL = baseURL
97	+ "&stayYear=" + stayYear
98	+ "&stayMonth=" + stayMonth
99	+ "&stayDay=" + stayDay
100	+ "&stayCount=" + stayCount 
101	+ "&adultNum=" + adultNum
102	//+ "&mealType=" + mealType
103	+ "&roomCount=" + roomCount
104	//+ "&minPrice=" + minPrice
105	//+ "&maxPrice=" + maxPrice
106
107  //同一ウィンドウ遷移の場合は残す
108  //document.location.href = planURL;
109  //別ウィンドウ遷移の場合は残す
110  window.open(planURL);
111}

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.