| 14 |
liveuser |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
#使用命名空間
|
|
|
4 |
namespace qbpwcf;
|
|
|
5 |
|
|
|
6 |
#匯入外部套件
|
|
|
7 |
include("../allInOne.php");
|
|
|
8 |
|
|
|
9 |
/*
|
|
|
10 |
|
|
|
11 |
#提示當前執行的函數
|
|
|
12 |
echo "<hr>frame::createIframe - testCase 1<br>";
|
|
|
13 |
|
|
|
14 |
#涵式說明:
|
|
|
15 |
#建立一個 iframe 框架
|
|
|
16 |
#回傳的結果:
|
|
|
17 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗。
|
|
|
18 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
19 |
#$result["error"],錯誤訊息提示
|
|
|
20 |
#$result["content"],iframe的語法
|
|
|
21 |
#必填的參數:
|
|
|
22 |
$conf["webPage"]="frameT-frame.php";#爲放入 iframe 網頁網址。
|
|
|
23 |
$conf["name"]="frameT";#爲該 iframe 的名稱。
|
|
|
24 |
$conf["br"]="true";#爲放置完該iframe後是否要換行,"true"爲要換行;"flase"爲不要換行。
|
|
|
25 |
#可省略的參數
|
|
|
26 |
#$conf["class"],字串陣列,爲該 iframe 要套用的css樣式類別名稱.
|
|
|
27 |
#$conf["class"]=array("");
|
|
|
28 |
#$conf["scrolling"],字串,是否要取消滾軸功能,"false"代表取消滾軸功能.
|
|
|
29 |
#$conf["scrolling"]="";
|
|
|
30 |
#$conf["width"],字串,iframe的寬度.
|
|
|
31 |
#$conf["width"]="";
|
|
|
32 |
#$conf["height"],字串,iframe的高度.
|
|
|
33 |
#$conf["height"]="";
|
|
|
34 |
$createIframe=frame::createIframe($conf);
|
|
|
35 |
unset($conf);
|
|
|
36 |
|
|
|
37 |
#如果建立失敗
|
|
|
38 |
if($createIframe["status"]==="false"){
|
|
|
39 |
|
|
|
40 |
#印出結果
|
|
|
41 |
var_dump($createIframe);
|
|
|
42 |
|
|
|
43 |
#結束程式
|
|
|
44 |
exit;
|
|
|
45 |
|
|
|
46 |
}#if end
|
|
|
47 |
|
|
|
48 |
#印出內容
|
|
|
49 |
echo $createIframe["content"];
|
|
|
50 |
|
|
|
51 |
*/
|
|
|
52 |
|
|
|
53 |
/*
|
|
|
54 |
|
|
|
55 |
#提示當前執行的函數
|
|
|
56 |
echo "<hr>frame::createIframe - testCase 2<br>";
|
|
|
57 |
|
|
|
58 |
#涵式說明:
|
|
|
59 |
#建立一個 iframe 框架
|
|
|
60 |
#回傳的結果:
|
|
|
61 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗。
|
|
|
62 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
63 |
#$result["error"],錯誤訊息提示
|
|
|
64 |
#$result["content"],iframe的語法
|
|
|
65 |
#必填的參數:
|
|
|
66 |
$conf["webPage"]="frameT-frame.php";#爲放入 iframe 網頁網址。
|
|
|
67 |
$conf["name"]="frameT";#爲該 iframe 的名稱。
|
|
|
68 |
$conf["br"]="true";#爲放置完該iframe後是否要換行,"true"爲要換行;"flase"爲不要換行。
|
|
|
69 |
#可省略的參數
|
|
|
70 |
#$conf["class"]="";#爲該 iframe 要套用的css樣式類別名稱,可省略。
|
|
|
71 |
$conf["scrolling"]="false";#是否要取消滾軸功能,"false"代表取消滾軸功能.
|
|
|
72 |
#$conf["width"],字串,iframe的寬度.
|
|
|
73 |
#$conf["width"]="";
|
|
|
74 |
#$conf["height"],字串,iframe的高度.
|
|
|
75 |
#$conf["height"]="";
|
|
|
76 |
$createIframe=frame::createIframe($conf);
|
|
|
77 |
unset($conf);
|
|
|
78 |
|
|
|
79 |
#如果建立失敗
|
|
|
80 |
if($createIframe["status"]==="false"){
|
|
|
81 |
|
|
|
82 |
#印出結果
|
|
|
83 |
var_dump($createIframe);
|
|
|
84 |
|
|
|
85 |
#結束程式
|
|
|
86 |
exit;
|
|
|
87 |
|
|
|
88 |
}#if end
|
|
|
89 |
|
|
|
90 |
#印出內容
|
|
|
91 |
echo $createIframe["content"];
|
|
|
92 |
|
|
|
93 |
*/
|
|
|
94 |
|
|
|
95 |
/*
|
|
|
96 |
|
|
|
97 |
#提示當前執行的函數
|
|
|
98 |
echo "<hr>frame::createIframe - testCase 3<br>";
|
|
|
99 |
|
|
|
100 |
#涵式說明:
|
|
|
101 |
#建立一個 iframe 框架
|
|
|
102 |
#回傳的結果:
|
|
|
103 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗。
|
|
|
104 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
105 |
#$result["error"],錯誤訊息提示
|
|
|
106 |
#$result["content"],iframe的語法
|
|
|
107 |
#必填的參數:
|
|
|
108 |
$conf["webPage"]="frameT-frame.php";#爲放入 iframe 網頁網址。
|
|
|
109 |
$conf["name"]="frameT";#爲該 iframe 的名稱。
|
|
|
110 |
$conf["br"]="true";#爲放置完該iframe後是否要換行,"true"爲要換行;"flase"爲不要換行。
|
|
|
111 |
#可省略的參數
|
|
|
112 |
#$conf["class"]="";#爲該 iframe 要套用的css樣式類別名稱,可省略。
|
|
|
113 |
#$conf["scrolling"]="false";#是否要取消滾軸功能,"false"代表取消滾軸功能.
|
|
|
114 |
#$conf["width"],字串,iframe的寬度.
|
|
|
115 |
$conf["width"]="50%";
|
|
|
116 |
#$conf["height"],字串,iframe的高度.
|
|
|
117 |
$conf["height"]="100%";
|
|
|
118 |
$createIframe=frame::createIframe($conf);
|
|
|
119 |
unset($conf);
|
|
|
120 |
|
|
|
121 |
#如果建立失敗
|
|
|
122 |
if($createIframe["status"]==="false"){
|
|
|
123 |
|
|
|
124 |
#印出結果
|
|
|
125 |
var_dump($createIframe);
|
|
|
126 |
|
|
|
127 |
#結束程式
|
|
|
128 |
exit;
|
|
|
129 |
|
|
|
130 |
}#if end
|
|
|
131 |
|
|
|
132 |
#印出內容
|
|
|
133 |
echo $createIframe["content"];
|
|
|
134 |
|
|
|
135 |
*/
|
|
|
136 |
|
|
|
137 |
/*
|
|
|
138 |
|
|
|
139 |
#提示當前執行的函數
|
|
|
140 |
echo "<hr>frame::createIframe - testCase 4<br>";
|
|
|
141 |
|
|
|
142 |
#涵式說明:
|
|
|
143 |
#透過javaScript傳送get數值到特定頁面,並且取得頁面的回應,將之結果放置在特定的區塊裏面。
|
|
|
144 |
#回傳的內容:
|
|
|
145 |
#$result["status"],執行正確與否,"true"代表執行正確,"false"代表執行失敗.
|
|
|
146 |
#$result["error"],錯誤訊息陣列.
|
|
|
147 |
#$result["content"],JavaScript的語法
|
|
|
148 |
#$result["function"],當前執行的函數名稱
|
|
|
149 |
#必填的參數:
|
|
|
150 |
$conf["javaScript::ajaxSendGetValue"]["receivePage"]="frameT/createIframe-testCase-4.php";#字串,要接收數值的頁面。
|
|
|
151 |
$conf["javaScript::ajaxSendGetValue"]["var"]=array("createIframeT4"=>"true");#陣列,要傳送的變數名稱與內容,$conf["var"]["name"]=$value,代表變數名為$name,值為$value.
|
|
|
152 |
$conf["javaScript::ajaxSendGetValue"]["jsFunctionName"]="createIframeT4";#字串,ajax裏面的js涵式名稱,使用該function的範例 jsFunction(this.value) ,這樣就會把表單的數值傳進去
|
|
|
153 |
$conf["javaScript::ajaxSendGetValue"]["responsePalaceId"]="createIframeT4";#字串,回傳的內容要呈現於哪個<span id = ? ></span>、<div id= ? ></div>區塊之間。
|
|
|
154 |
#參考資料來源:
|
|
|
155 |
#http://www.w3school.com.cn/php/php_ajax_suggest.asp
|
|
|
156 |
#http://www.w3schools.com/php/php_ajax_php.asp
|
|
|
157 |
$ajaxSendGetValue=javaScript::ajaxSendGetValue($conf["javaScript::ajaxSendGetValue"]);
|
|
|
158 |
unset($conf["javaScript::ajaxSendGetValue"]);
|
|
|
159 |
|
|
|
160 |
#印出語法
|
|
|
161 |
echo $ajaxSendGetValue["content"];
|
|
|
162 |
|
|
|
163 |
#觸發ajax的按鈕
|
|
|
164 |
echo "<button onclick=createIframeT4() type=\"button\">ajax</button>";
|
|
|
165 |
|
|
|
166 |
#取得回饋的按鈕
|
|
|
167 |
echo "<div id=\"createIframeT4\"></div>";
|
|
|
168 |
|
|
|
169 |
#涵式說明:
|
|
|
170 |
#建立一個 iframe 框架
|
|
|
171 |
#回傳的結果:
|
|
|
172 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗。
|
|
|
173 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
174 |
#$result["error"],錯誤訊息提示
|
|
|
175 |
#$result["content"],iframe的語法
|
|
|
176 |
#必填的參數:
|
|
|
177 |
#$conf["webPage"],字串,爲放入 iframe 網頁網址.
|
|
|
178 |
$conf["webPage"]="frameT/createIframe-testCase-4-1.php";
|
|
|
179 |
#$conf["name"],爲該 iframe 的名稱.
|
|
|
180 |
$conf["name"]="createIframe-testCase-4-1";
|
|
|
181 |
#$conf["br"],字串,爲放置完該iframe後是否要換行,"true"爲要換行;"flase"爲不要換行。
|
|
|
182 |
$conf["br"]="true";
|
|
|
183 |
#可省略的參數
|
|
|
184 |
#$conf["class"],字串陣列,爲該 iframe 要套用的css樣式類別名稱.
|
|
|
185 |
#$conf["class"]=array("");
|
|
|
186 |
#$conf["scrolling"],字串,是否要取消滾軸功能,"false"代表取消滾軸功能.
|
|
|
187 |
#$conf["scrolling"]="";
|
|
|
188 |
#$conf["width"],字串,iframe的寬度.
|
|
|
189 |
#$conf["width"]="";
|
|
|
190 |
#$conf["height"],字串,iframe的高度.
|
|
|
191 |
#$conf["height"]="";
|
|
|
192 |
$createIframe=frame::createIframe($conf);
|
|
|
193 |
unset($conf);
|
|
|
194 |
|
|
|
195 |
#如果建立 iframe 失敗
|
|
|
196 |
if($createIframe["status"]==="false"){
|
|
|
197 |
|
|
|
198 |
#印出結果
|
|
|
199 |
var_dump($createIframe);
|
|
|
200 |
|
|
|
201 |
#結束執行
|
|
|
202 |
exit;
|
|
|
203 |
|
|
|
204 |
}#if end
|
|
|
205 |
|
|
|
206 |
#印出 iframe
|
|
|
207 |
echo $createIframe["content"];
|
|
|
208 |
|
|
|
209 |
*/
|
|
|
210 |
|
|
|
211 |
/*
|
|
|
212 |
|
|
|
213 |
#提示當前執行的函數
|
|
|
214 |
echo "<hr>frame::createIframe - testCase 5<br>";
|
|
|
215 |
|
|
|
216 |
#涵式說明:
|
|
|
217 |
#建立一個 iframe 框架
|
|
|
218 |
#回傳的結果:
|
|
|
219 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗。
|
|
|
220 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
221 |
#$result["error"],錯誤訊息提示
|
|
|
222 |
#$result["content"],iframe的語法
|
|
|
223 |
#必填的參數:
|
|
|
224 |
#$conf["webPage"],字串,爲放入 iframe 網頁網址.
|
|
|
225 |
$conf["webPage"]="https://start.fedoraproject.org/";
|
|
|
226 |
#$conf["name"],爲該 iframe 的名稱.
|
|
|
227 |
$conf["name"]="t5";
|
|
|
228 |
#$conf["br"],字串,爲放置完該iframe後是否要換行,"true"爲要換行;"flase"爲不要換行。
|
|
|
229 |
$conf["br"]="true";
|
|
|
230 |
#可省略的參數
|
|
|
231 |
#$conf["class"],字串陣列,爲該 iframe 要套用的css樣式類別名稱.
|
|
|
232 |
#$conf["class"]=array("");
|
|
|
233 |
#$conf["scrolling"],字串,是否要取消滾軸功能,"false"代表取消滾軸功能.
|
|
|
234 |
#$conf["scrolling"]="";
|
|
|
235 |
#$conf["width"],字串,iframe的寬度.
|
|
|
236 |
$conf["width"]="100%";
|
|
|
237 |
#$conf["height"],字串,iframe的高度.
|
|
|
238 |
$conf["height"]="100%";
|
|
|
239 |
#$conf["minWidth"],字串,最小的寬度.
|
|
|
240 |
$conf["minWidth"]="400px";
|
|
|
241 |
#$conf["maxWidth"],字串,最大寬度.
|
|
|
242 |
$conf["maxWidth"]="800px";
|
|
|
243 |
#$conf["minHeight"],字串,最小的高度.
|
|
|
244 |
$conf["minHeight"]="100px";
|
|
|
245 |
#$conf["maxHeight"],字串,最大的高度.
|
|
|
246 |
$conf["maxHeight"]="100px";
|
|
|
247 |
$createIframe=frame::createIframe($conf);
|
|
|
248 |
unset($conf);
|
|
|
249 |
|
|
|
250 |
#如果建立ifame失敗
|
|
|
251 |
if($createIframe["status"]==="false"){
|
|
|
252 |
|
|
|
253 |
#印出內容
|
|
|
254 |
var_dump($createIframe);
|
|
|
255 |
|
|
|
256 |
#停止執行
|
|
|
257 |
exit;
|
|
|
258 |
|
|
|
259 |
}#if end
|
|
|
260 |
|
|
|
261 |
#印出語法
|
|
|
262 |
echo $createIframe["content"];
|
|
|
263 |
|
|
|
264 |
*/
|
|
|
265 |
|
|
|
266 |
/*
|
|
|
267 |
|
|
|
268 |
#提示當前執行的函數
|
|
|
269 |
echo "<hr>frame::createIframe - testCase 6<br>";
|
|
|
270 |
|
|
|
271 |
#涵式說明:
|
|
|
272 |
#建立一個 iframe 框架
|
|
|
273 |
#回傳的結果:
|
|
|
274 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗。
|
|
|
275 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
276 |
#$result["error"],錯誤訊息提示
|
|
|
277 |
#$result["content"],iframe的語法
|
|
|
278 |
#必填的參數:
|
|
|
279 |
#$conf["webPage"],字串,爲放入 iframe 網頁網址.
|
|
|
280 |
$conf["webPage"]="https://169.254.1.2";
|
|
|
281 |
#$conf["name"],爲該 iframe 的名稱.
|
|
|
282 |
$conf["name"]="top";
|
|
|
283 |
#$conf["br"],字串,爲放置完該iframe後是否要換行,"true"爲要換行;"flase"爲不要換行。
|
|
|
284 |
$conf["br"]="false";
|
|
|
285 |
#可省略的參數
|
|
|
286 |
#$conf["class"],字串陣列,爲該 iframe 要套用的css樣式類別名稱.
|
|
|
287 |
#$conf["class"]=array("");
|
|
|
288 |
#$conf["scrolling"],字串,是否要取消滾軸功能,"false"代表取消滾軸功能.
|
|
|
289 |
#$conf["scrolling"]="";
|
|
|
290 |
#$conf["width"],字串,iframe的寬度.
|
|
|
291 |
#$conf["width"]="";
|
|
|
292 |
#$conf["height"],字串,iframe的高度.
|
|
|
293 |
$conf["height"]="100px";
|
|
|
294 |
#$conf["minWidth"],字串,最小的寬度.
|
|
|
295 |
#$conf["minWidth"]="";
|
|
|
296 |
#$conf["maxWidth"],字串,最大寬度.
|
|
|
297 |
#$conf["maxWidth"]="100px";
|
|
|
298 |
#$conf["minHeight"],字串,最小的高度.
|
|
|
299 |
#$conf["minHeight"]="100px";
|
|
|
300 |
#$conf["maxHeight"],字串,最大的高度.
|
|
|
301 |
#$conf["maxHeight"]="10%";
|
|
|
302 |
$createIframe=frame::createIframe($conf);
|
|
|
303 |
unset($conf);
|
|
|
304 |
|
|
|
305 |
#如果建立iframe失敗
|
|
|
306 |
if($createIframe["status"]==="false")
|
|
|
307 |
{
|
|
|
308 |
#印出內容
|
|
|
309 |
var_dump($createIframe);
|
|
|
310 |
|
|
|
311 |
#停止執行
|
|
|
312 |
exit;
|
|
|
313 |
|
|
|
314 |
}#if end
|
|
|
315 |
|
|
|
316 |
#印出內容
|
|
|
317 |
echo $createIframe["content"];
|
|
|
318 |
|
|
|
319 |
*/
|
|
|
320 |
|
|
|
321 |
/*
|
|
|
322 |
|
|
|
323 |
#提示當前執行的函數
|
|
|
324 |
echo "<hr>frame::createIframe - testCase 7<br>";
|
|
|
325 |
|
|
|
326 |
#涵式說明:
|
|
|
327 |
#建立一個 iframe 框架
|
|
|
328 |
#回傳的結果:
|
|
|
329 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗。
|
|
|
330 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
331 |
#$result["error"],錯誤訊息提示
|
|
|
332 |
#$result["content"],iframe的語法
|
|
|
333 |
#必填的參數:
|
|
|
334 |
#$conf["webPage"],字串,爲放入 iframe 網頁網址.
|
|
|
335 |
$conf["webPage"]="https://169.254.1.2";
|
|
|
336 |
#$conf["name"],爲該 iframe 的名稱.
|
|
|
337 |
$conf["name"]="top";
|
|
|
338 |
#$conf["br"],字串,爲放置完該iframe後是否要換行,"true"爲要換行;"flase"爲不要換行。
|
|
|
339 |
$conf["br"]="true";
|
|
|
340 |
#可省略的參數
|
|
|
341 |
#$conf["class"],字串陣列,爲該 iframe 要套用的css樣式類別名稱.
|
|
|
342 |
#$conf["class"]=array("");
|
|
|
343 |
#$conf["scrolling"],字串,是否要取消滾軸功能,"false"代表取消滾軸功能.
|
|
|
344 |
#$conf["scrolling"]="";
|
|
|
345 |
#$conf["width"],字串,iframe的寬度.
|
|
|
346 |
#$conf["width"]="";
|
|
|
347 |
#$conf["height"],字串,iframe的高度.
|
|
|
348 |
$conf["height"]="100px";
|
|
|
349 |
#$conf["minWidth"],字串,最小的寬度.
|
|
|
350 |
#$conf["minWidth"]="";
|
|
|
351 |
#$conf["maxWidth"],字串,最大寬度.
|
|
|
352 |
#$conf["maxWidth"]="";
|
|
|
353 |
#$conf["minHeight"],字串,最小的高度.
|
|
|
354 |
#$conf["minHeight"]="100px";
|
|
|
355 |
#$conf["maxHeight"],字串,最大的高度.
|
|
|
356 |
#$conf["maxHeight"]="10%";
|
|
|
357 |
$createIframe=frame::createIframe($conf);
|
|
|
358 |
unset($conf);
|
|
|
359 |
|
|
|
360 |
#如果建立iframe失敗
|
|
|
361 |
if($createIframe["status"]==="false")
|
|
|
362 |
{
|
|
|
363 |
#印出內容
|
|
|
364 |
var_dump($createIframe);
|
|
|
365 |
|
|
|
366 |
#停止執行
|
|
|
367 |
exit;
|
|
|
368 |
|
|
|
369 |
}#if end
|
|
|
370 |
|
|
|
371 |
#印出內容
|
|
|
372 |
echo $createIframe["content"];
|
|
|
373 |
|
|
|
374 |
#涵式說明:
|
|
|
375 |
#建立一個 iframe 框架
|
|
|
376 |
#回傳的結果:
|
|
|
377 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗。
|
|
|
378 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
379 |
#$result["error"],錯誤訊息提示
|
|
|
380 |
#$result["content"],iframe的語法
|
|
|
381 |
#必填的參數:
|
|
|
382 |
#$conf["webPage"],字串,爲放入 iframe 網頁網址.
|
|
|
383 |
$conf["webPage"]="https://169.254.1.2";
|
|
|
384 |
#$conf["name"],爲該 iframe 的名稱.
|
|
|
385 |
$conf["name"]="bottom";
|
|
|
386 |
#$conf["br"],字串,爲放置完該iframe後是否要換行,"true"爲要換行;"flase"爲不要換行。
|
|
|
387 |
$conf["br"]="true";
|
|
|
388 |
#可省略的參數
|
|
|
389 |
#$conf["class"],字串陣列,爲該 iframe 要套用的css樣式類別名稱.
|
|
|
390 |
#$conf["class"]=array("");
|
|
|
391 |
#$conf["scrolling"],字串,是否要取消滾軸功能,"false"代表取消滾軸功能.
|
|
|
392 |
#$conf["scrolling"]="";
|
|
|
393 |
#$conf["width"],字串,iframe的寬度.
|
|
|
394 |
#$conf["width"]="";
|
|
|
395 |
#$conf["height"],字串,iframe的高度.
|
|
|
396 |
#$conf["height"]="100px";
|
|
|
397 |
#$conf["minWidth"],字串,最小的寬度.
|
|
|
398 |
#$conf["minWidth"]="";
|
|
|
399 |
#$conf["maxWidth"],字串,最大寬度.
|
|
|
400 |
#$conf["maxWidth"]="";
|
|
|
401 |
#$conf["minHeight"],字串,最小的高度.
|
|
|
402 |
#$conf["minHeight"]="100px";
|
|
|
403 |
#$conf["maxHeight"],字串,最大的高度.
|
|
|
404 |
#$conf["maxHeight"]="10%";
|
|
|
405 |
#$conf["soucreId"],字串,如果要跟該function建立出來的ifame來動態調整高度為用戶看到的高度減去其高度,請給予來源iframe的id,此參數僅在$conf["br"]為"true"時生效.
|
|
|
406 |
$conf["soucreId"]="top";
|
|
|
407 |
$createIframe=frame::createIframe($conf);
|
|
|
408 |
unset($conf);
|
|
|
409 |
|
|
|
410 |
#如果建立iframe失敗
|
|
|
411 |
if($createIframe["status"]==="false")
|
|
|
412 |
{
|
|
|
413 |
#印出內容
|
|
|
414 |
var_dump($createIframe);
|
|
|
415 |
|
|
|
416 |
#停止執行
|
|
|
417 |
exit;
|
|
|
418 |
|
|
|
419 |
}#if end
|
|
|
420 |
|
|
|
421 |
#印出內容
|
|
|
422 |
echo $createIframe["content"];
|
|
|
423 |
|
|
|
424 |
echo "
|
|
|
425 |
<script>
|
|
|
426 |
|
|
|
427 |
var changeEleHeightToFullLessSource=function(){
|
|
|
428 |
|
|
|
429 |
var bottomDiv=document.getElementById('bottom').parentElement;
|
|
|
430 |
var bottomDivH=bottomDiv.clientHeight;
|
|
|
431 |
|
|
|
432 |
var windowH=document.body.clientHeight;
|
|
|
433 |
|
|
|
434 |
var topDiv=document.getElementById('top').parentElement;
|
|
|
435 |
var topDivH=topDiv.clientHeight;
|
|
|
436 |
|
|
|
437 |
var bottomDivStyle=window.getComputedStyle(bottomDiv,null);
|
|
|
438 |
//console.log(bottomDivStyle.toSource());
|
|
|
439 |
console.log('original height is '+bottomDivStyle['height']);
|
|
|
440 |
|
|
|
441 |
console.log('var windowH is '+windowH);
|
|
|
442 |
console.log('var topDivH is '+topDivH);
|
|
|
443 |
var newBottomDivH=windowH-topDivH+'px';
|
|
|
444 |
bottomDiv.style.height=windowH-topDivH+'px';
|
|
|
445 |
console.log('altered height is '+newBottomDivH);
|
|
|
446 |
|
|
|
447 |
};
|
|
|
448 |
|
|
|
449 |
window.addEventListener('resize',changeEleHeightToFullLessSource);
|
|
|
450 |
|
|
|
451 |
</script>
|
|
|
452 |
";
|
|
|
453 |
|
|
|
454 |
*/
|
|
|
455 |
|
|
|
456 |
/*
|
|
|
457 |
|
|
|
458 |
#提示當前執行的函數
|
|
|
459 |
echo "<hr>frame::createIframe - testCase 8<br>";
|
|
|
460 |
|
|
|
461 |
#涵式說明:
|
|
|
462 |
#建立一個 iframe 框架
|
|
|
463 |
#回傳的結果:
|
|
|
464 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗。
|
|
|
465 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
466 |
#$result["error"],錯誤訊息提示
|
|
|
467 |
#$result["content"],iframe的語法
|
|
|
468 |
#必填的參數:
|
|
|
469 |
#$conf["webPage"],字串,爲放入 iframe 網頁網址.
|
|
|
470 |
$conf["webPage"]="https://egg-roll.qbpwcf.org";
|
|
|
471 |
#$conf["name"],爲該 iframe 的名稱.
|
|
|
472 |
$conf["name"]="egg-roll";
|
|
|
473 |
#$conf["br"],字串,爲放置完該iframe後是否要換行,"true"爲要換行;"flase"爲不要換行。
|
|
|
474 |
$conf["br"]="true";
|
|
|
475 |
#可省略的參數
|
|
|
476 |
#$conf["class"],字串陣列,爲該 iframe 要套用的css樣式類別名稱.
|
|
|
477 |
#$conf["class"]=array("");
|
|
|
478 |
#$conf["scrolling"],字串,是否要取消滾軸功能,"false"代表取消滾軸功能.
|
|
|
479 |
#$conf["scrolling"]="";
|
|
|
480 |
#$conf["width"],字串,iframe的寬度.
|
|
|
481 |
#$conf["width"]="";
|
|
|
482 |
#$conf["height"],字串,iframe的高度.
|
|
|
483 |
#$conf["height"]="";
|
|
|
484 |
#$conf["minWidth"],字串,最小的寬度.
|
|
|
485 |
#$conf["minWidth"]="";
|
|
|
486 |
#$conf["maxWidth"],字串,最大寬度.
|
|
|
487 |
#$conf["maxWidth"]="";
|
|
|
488 |
#$conf["minHeight"],字串,最小的高度.
|
|
|
489 |
#$conf["minHeight"]="";
|
|
|
490 |
#$conf["maxHeight"],字串,最大的高度.
|
|
|
491 |
#$conf["maxHeight"]="";
|
|
|
492 |
#$conf["soucreId"],字串,如果要跟該function建立出來的ifame來動態調整高度為用戶看到的高度減去其高度,請給予來源iframe的id,此參數僅在$conf["br"]為"true"時生效.
|
|
|
493 |
#$conf["soucreId"]="";
|
|
|
494 |
#$conf["extraAttrAndValue"],字串陣列,每個額外的屬性與其對應的數值,key為屬性名稱,value為屬性數值.
|
|
|
495 |
$conf["extraAttrAndValue"]=array("style"=>"text-align:center;");
|
|
|
496 |
#$conf["frameExtraAttrAndValue"],字串陣列,frame每個額外的屬性與其對應的數值,key為屬性名稱,value為屬性數值.
|
|
|
497 |
$conf["frameExtraAttrAndValue"]=array("style"=>"width:80vw;height:80vh;");
|
|
|
498 |
$createIframe=frame::createIframe($conf);
|
|
|
499 |
unset($conf);
|
|
|
500 |
|
|
|
501 |
#如果建立iframe失敗
|
|
|
502 |
if($createIframe["status"]==="false")
|
|
|
503 |
{
|
|
|
504 |
#印出內容
|
|
|
505 |
var_dump($createIframe);
|
|
|
506 |
|
|
|
507 |
#停止執行
|
|
|
508 |
exit;
|
|
|
509 |
|
|
|
510 |
}#if end
|
|
|
511 |
|
|
|
512 |
#印出內容
|
|
|
513 |
echo $createIframe["content"];
|
|
|
514 |
|
|
|
515 |
*/
|
|
|
516 |
|
|
|
517 |
/*
|
|
|
518 |
|
|
|
519 |
#提示當前執行的函數
|
|
|
520 |
echo "<hr>frame::createMultiIframe - testCase 1<br>";
|
|
|
521 |
|
|
|
522 |
#涵式說明:
|
|
|
523 |
#建立多個 iframe
|
|
|
524 |
#回傳的結果:
|
|
|
525 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗。
|
|
|
526 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
527 |
#$result["error"],錯誤訊息提示
|
|
|
528 |
#$result["content"],iframe的語法
|
|
|
529 |
#必填的參數:
|
|
|
530 |
#$conf["webPage"],字串陣列,爲每個要放入 iframe 的網頁網址.
|
|
|
531 |
$conf["webPage"]=array("frameT-frame.php","frameT-frame.php","frameT-frame.php");
|
|
|
532 |
#$conf["name"],字串陣列,爲每個 iframe 的名稱與id.
|
|
|
533 |
$conf["name"]=array("frameT-frame1","frameT-frame2","frameT-frame3");
|
|
|
534 |
#$conf["br"],字串陣列,爲放置完各個iframe後是否要換行,"true"爲要換行;"flase"爲不要換行。
|
|
|
535 |
$conf["br"]=array("true","true","true");
|
|
|
536 |
#可省略的參數
|
|
|
537 |
#$conf["class"],字串陣列,爲各個 iframe 要套用的css樣式類別名稱.
|
|
|
538 |
#$conf["class"]=array(array(""));
|
|
|
539 |
#$conf["scrolling"],字串陣列,是否要取消各個iframe的滾軸功能,"false"代表取消滾軸功能.
|
|
|
540 |
#$conf["scrolling"]=array("false");
|
|
|
541 |
#$conf["width"],字串陣列,各個iframe的寬度.
|
|
|
542 |
#$conf["width"]=array("");
|
|
|
543 |
#$conf["height"],字串陣列,各個iframe的高度.
|
|
|
544 |
$conf["height"]=array("33%","33%","33%");
|
|
|
545 |
#$conf["minWidth"],字串陣列,各個iframe最小的寬度.
|
|
|
546 |
#$conf["minWidth"]=array("");
|
|
|
547 |
#$conf["maxWidth"],字串陣列,各個iframe最大寬度.
|
|
|
548 |
#$conf["maxWidth"]=array("");
|
|
|
549 |
#$conf["minHeight"],字串陣列,各個iframe最小的高度.
|
|
|
550 |
#$conf["minHeight"]=array("");
|
|
|
551 |
#$conf["maxHeight"],字串陣列,各個最大的高度.
|
|
|
552 |
#$conf["maxHeight"]=array("");
|
|
|
553 |
#$conf["soucreId"],字串陣列,各個iframe如果要跟該function建立出來的ifame來動態調整高度為用戶看到的高度減去其高度,請給予來源iframe的id,此參數僅在$conf["br"]為"true"時生效.
|
|
|
554 |
#$conf["soucreId"]=array("");
|
|
|
555 |
var_dump(frame::createMultiIframe($conf));
|
|
|
556 |
unset($conf);
|
|
|
557 |
|
|
|
558 |
*/
|
|
|
559 |
|
|
|
560 |
/*
|
|
|
561 |
|
|
|
562 |
#提示當前執行的函數
|
|
|
563 |
echo "<hr>frame::createMultiIframe - testCase 2<br>";
|
|
|
564 |
|
|
|
565 |
#涵式說明:
|
|
|
566 |
#建立多個 iframe
|
|
|
567 |
#回傳的結果:
|
|
|
568 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗。
|
|
|
569 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
570 |
#$result["error"],錯誤訊息提示
|
|
|
571 |
#$result["content"],iframe的語法
|
|
|
572 |
#必填的參數:
|
|
|
573 |
#$conf["webPage"],字串陣列,爲每個要放入 iframe 的網頁網址.
|
|
|
574 |
$conf["webPage"]=array("frameT/createMultiIframe1.php","frameT/createMultiIframe2.php");
|
|
|
575 |
#$conf["name"],字串陣列,爲每個 iframe 的名稱與id.
|
|
|
576 |
$conf["name"]=array("createMultiIframe1","createMultiIframe2");
|
|
|
577 |
#$conf["br"],字串陣列,爲放置完各個iframe後是否要換行,"true"爲要換行;"flase"爲不要換行。
|
|
|
578 |
$conf["br"]=array("true","true");
|
|
|
579 |
#可省略的參數
|
|
|
580 |
#$conf["class"],字串陣列,爲各個 iframe 要套用的css樣式類別名稱.
|
|
|
581 |
#$conf["class"]=array(array(""));
|
|
|
582 |
#$conf["scrolling"],字串陣列,是否要取消各個iframe的滾軸功能,"false"代表取消滾軸功能.
|
|
|
583 |
#$conf["scrolling"]=array("false");
|
|
|
584 |
#$conf["width"],字串陣列,各個iframe的寬度.
|
|
|
585 |
#$conf["width"]=array("");
|
|
|
586 |
#$conf["height"],字串陣列,各個iframe的高度.
|
|
|
587 |
$conf["height"]=array("50%","50%");
|
|
|
588 |
#$conf["minWidth"],字串陣列,各個iframe最小的寬度.
|
|
|
589 |
#$conf["minWidth"]=array("");
|
|
|
590 |
#$conf["maxWidth"],字串陣列,各個iframe最大寬度.
|
|
|
591 |
#$conf["maxWidth"]=array("");
|
|
|
592 |
#$conf["minHeight"],字串陣列,各個iframe最小的高度.
|
|
|
593 |
#$conf["minHeight"]=array("");
|
|
|
594 |
#$conf["maxHeight"],字串陣列,各個最大的高度.
|
|
|
595 |
#$conf["maxHeight"]=array("");
|
|
|
596 |
#$conf["soucreId"],字串陣列,各個iframe如果要跟該function建立出來的ifame來動態調整高度為用戶看到的高度減去其高度,請給予來源iframe的id,此參數僅在$conf["br"]為"true"時生效.
|
|
|
597 |
#$conf["soucreId"]=array("");
|
|
|
598 |
var_dump(frame::createMultiIframe($conf));
|
|
|
599 |
unset($conf);
|
|
|
600 |
|
|
|
601 |
*/
|
|
|
602 |
|
|
|
603 |
/*
|
|
|
604 |
|
|
|
605 |
#提示當前執行的函數
|
|
|
606 |
echo "<hr>frame::createMultiIframe - testCase 3<br>";
|
|
|
607 |
|
|
|
608 |
#涵式說明:
|
|
|
609 |
#建立多個 iframe
|
|
|
610 |
#回傳的結果:
|
|
|
611 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗。
|
|
|
612 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
613 |
#$result["error"],錯誤訊息提示
|
|
|
614 |
#$result["content"],iframe的語法
|
|
|
615 |
#必填的參數:
|
|
|
616 |
#$conf["webPage"],字串陣列,爲每個要放入 iframe 的網頁網址.
|
|
|
617 |
$conf["webPage"]=array("frameT/top.html","frameT/bottom.html");
|
|
|
618 |
#$conf["name"],字串陣列,爲每個 iframe 的名稱與id.
|
|
|
619 |
$conf["name"]=array("top","bottom");
|
|
|
620 |
#$conf["br"],字串陣列,爲放置完各個iframe後是否要換行,"true"爲要換行;"flase"爲不要換行。
|
|
|
621 |
$conf["br"]=array("true","true");
|
|
|
622 |
#可省略的參數
|
|
|
623 |
#$conf["class"],字串陣列,爲各個 iframe 要套用的css樣式類別名稱.
|
|
|
624 |
#$conf["class"]=array(array(""));
|
|
|
625 |
#$conf["scrolling"],字串陣列,是否要取消各個iframe的滾軸功能,"false"代表取消滾軸功能.
|
|
|
626 |
#$conf["scrolling"]=array("false");
|
|
|
627 |
#$conf["width"],字串陣列,各個iframe的寬度.
|
|
|
628 |
#$conf["width"]=array("");
|
|
|
629 |
#$conf["height"],字串陣列,各個iframe的高度.
|
|
|
630 |
$conf["height"]=array("100px","500px");
|
|
|
631 |
#$conf["minWidth"],字串陣列,各個iframe最小的寬度.
|
|
|
632 |
#$conf["minWidth"]=array("");
|
|
|
633 |
#$conf["maxWidth"],字串陣列,各個iframe最大寬度.
|
|
|
634 |
#$conf["maxWidth"]=array("");
|
|
|
635 |
#$conf["minHeight"],字串陣列,各個iframe最小的高度.
|
|
|
636 |
#$conf["minHeight"]=array("");
|
|
|
637 |
#$conf["maxHeight"],字串陣列,各個最大的高度.
|
|
|
638 |
#$conf["maxHeight"]=array("");
|
|
|
639 |
#$conf["soucreId"],字串陣列,各個iframe如果要跟該function建立出來的ifame來動態調整高度為用戶看到的高度減去其高度,請給予來源iframe的id,此參數僅在$conf["br"]為"true"時生效.
|
|
|
640 |
$conf["soucreId"]=array(null,"top");
|
|
|
641 |
$createMultiIframe=frame::createMultiIframe($conf);
|
|
|
642 |
unset($conf);
|
|
|
643 |
|
|
|
644 |
#如果建立多個iframe失敗
|
|
|
645 |
if($createMultiIframe["status"]==="false"){
|
|
|
646 |
|
|
|
647 |
#印出結果
|
|
|
648 |
var_dump($createMultiIframe);
|
|
|
649 |
|
|
|
650 |
#結束執行
|
|
|
651 |
exit;
|
|
|
652 |
|
|
|
653 |
}#if end
|
|
|
654 |
|
|
|
655 |
#印出語法
|
|
|
656 |
echo $createMultiIframe["content"];
|
|
|
657 |
|
|
|
658 |
*/
|
|
|
659 |
|
|
|
660 |
/*
|
|
|
661 |
|
|
|
662 |
#提示當前執行的函數
|
|
|
663 |
echo "<hr>frame::div - testCase 1<br>";
|
|
|
664 |
|
|
|
665 |
#函式說明:
|
|
|
666 |
#用div做成的frame.
|
|
|
667 |
#回傳結果:
|
|
|
668 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗.
|
|
|
669 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
670 |
#$result["error"],錯誤訊息提示.
|
|
|
671 |
#$result["content"],div frame的語法.
|
|
|
672 |
#必填參數:
|
|
|
673 |
#$conf["id"],字串,div frmae的id.
|
|
|
674 |
$conf["id"]="div_t_1";
|
|
|
675 |
#可省略參數:
|
|
|
676 |
#$conf["content"],字串陣列,要放入到frame的內容,預設不使用.
|
|
|
677 |
$conf["content"]=array("<div>A</div>","<div>B</div>","<div>C</div>","<div>D</div>","<div>E</div>","<div>F</div>","<div>G</div>","<div>H</div>","<div>I</div>","<div>J</div>","<div>K</div>","<div>L</div>","<div>M</div>","<div>N</div>","<div>O</div>","<div>P</div>","<div>Q</div>");
|
|
|
678 |
#$conf["oneScreenSize"],字串,是否要為視窗的高度,"true"代表要;"false"代表不要.
|
|
|
679 |
#$conf["oneScreenSize"]="";
|
|
|
680 |
#$conf["height"],字串,frame的高度,若 "oneScreenSize" 設置為 "true",則忽略本參數.
|
|
|
681 |
$conf["height"]="200px";
|
|
|
682 |
#備註:
|
|
|
683 |
#建構中...
|
|
|
684 |
$div=frame::div($conf);
|
|
|
685 |
unset($conf);
|
|
|
686 |
|
|
|
687 |
#如果執行失敗
|
|
|
688 |
if($div["status"]==="false"){
|
|
|
689 |
|
|
|
690 |
#印出內容
|
|
|
691 |
var_dump($div);
|
|
|
692 |
|
|
|
693 |
#停止執行
|
|
|
694 |
exit;
|
|
|
695 |
|
|
|
696 |
}#if end
|
|
|
697 |
|
|
|
698 |
#印出內容
|
|
|
699 |
echo $div["content"];
|
|
|
700 |
|
|
|
701 |
*/
|
|
|
702 |
|
|
|
703 |
/*
|
|
|
704 |
|
|
|
705 |
#提示當前執行的函數
|
|
|
706 |
echo "<hr>frame::div - testCase 2<br>";
|
|
|
707 |
|
|
|
708 |
#函式說明:
|
|
|
709 |
#用div做成的frame.
|
|
|
710 |
#回傳結果:
|
|
|
711 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗.
|
|
|
712 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
713 |
#$result["error"],錯誤訊息提示.
|
|
|
714 |
#$result["content"],div frame的語法.
|
|
|
715 |
#必填參數:
|
|
|
716 |
#$conf["id"],字串,div frmae的id.
|
|
|
717 |
$conf["id"]="div_t_1";
|
|
|
718 |
#可省略參數:
|
|
|
719 |
#$conf["content"],字串陣列,要放入到frame的內容,預設不使用.
|
|
|
720 |
$conf["content"]=array("<div>A</div>","<div>B</div>","<div>C</div>","<div>D</div>","<div>E</div>","<div>F</div>","<div>G</div>","<div>H</div>","<div>I</div>","<div>J</div>","<div>K</div>","<div>L</div>","<div>M</div>","<div>N</div>","<div>O</div>","<div>P</div>","<div>Q</div>");
|
|
|
721 |
#$conf["oneScreenSize"],字串,是否要為視窗的高度,"true"代表要;"false"代表不要.
|
|
|
722 |
$conf["oneScreenSize"]="true";
|
|
|
723 |
#$conf["height"],字串,frame的高度,若 "oneScreenSize" 設置為 "true",則忽略本參數.
|
|
|
724 |
$conf["height"]="200px";
|
|
|
725 |
#備註:
|
|
|
726 |
#建構中...
|
|
|
727 |
$div=frame::div($conf);
|
|
|
728 |
unset($conf);
|
|
|
729 |
|
|
|
730 |
#如果執行失敗
|
|
|
731 |
if($div["status"]==="false"){
|
|
|
732 |
|
|
|
733 |
#印出內容
|
|
|
734 |
var_dump($div);
|
|
|
735 |
|
|
|
736 |
#停止執行
|
|
|
737 |
exit;
|
|
|
738 |
|
|
|
739 |
}#if end
|
|
|
740 |
|
|
|
741 |
#印出內容
|
|
|
742 |
echo $div["content"];
|
|
|
743 |
|
|
|
744 |
*/
|
|
|
745 |
|
|
|
746 |
/*
|
|
|
747 |
|
|
|
748 |
#提示當前執行的函數
|
|
|
749 |
echo "<hr>frame::multiDiv - testCase 1<br>";
|
|
|
750 |
|
|
|
751 |
#函式說明:
|
|
|
752 |
#建立多個用div做成的frame.
|
|
|
753 |
#回傳結果:
|
|
|
754 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗.
|
|
|
755 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
756 |
#$result["error"],錯誤訊息提示.
|
|
|
757 |
#$result["content"],div frame的語法.
|
|
|
758 |
#必填參數:
|
|
|
759 |
#$conf["id"],字串陣列,每個div frame的id.
|
|
|
760 |
$conf["id"]=array("A","B");
|
|
|
761 |
#可省略參數:
|
|
|
762 |
#$conf["content"],二維字串陣列,要放入到每個frame的內容,預設不使用,若有個要放有的不要放內容,則不放內容的元素設為null.
|
|
|
763 |
#$conf["content"]=array(array());
|
|
|
764 |
#$conf["oneScreenSize"],字串陣列,各個frame是否要為視窗的高度,"true"代表要;"false"代表不要。裡面的div元素也會變成跟視窗一樣高.內部的div要使用line-height:normal樣式來取消效果.
|
|
|
765 |
#$conf["oneScreenSize"]=array("");
|
|
|
766 |
#$conf["height"],字串陣列,各個frame的高度,若不設置則請給予null,若 "oneScreenSize" 設置為 "true",則忽略本參數.
|
|
|
767 |
#$conf["height"]=array("");
|
|
|
768 |
#$conf["div2heightIsSeeHeightLessDiv1height"],字串,"true"代表第2個 div frame如果要跟第1個 div frame 來動態調整高度為用戶看到的高度減去第1個 div frame高度;預設為"false"代表不使用.若 "content" 的元素數量不等於2則會強制為"false".
|
|
|
769 |
#$conf["div2heightIsSeeHeightLessDiv1height"]="false";
|
|
|
770 |
$multiDiv=frame::multiDiv($conf);
|
|
|
771 |
unset($conf);
|
|
|
772 |
|
|
|
773 |
#如果設置失敗
|
|
|
774 |
if($multiDiv["status"]==="false"){
|
|
|
775 |
|
|
|
776 |
#印出內容
|
|
|
777 |
var_dump($multiDiv);
|
|
|
778 |
|
|
|
779 |
#停止執行
|
|
|
780 |
exit;
|
|
|
781 |
|
|
|
782 |
}#if end
|
|
|
783 |
|
|
|
784 |
#印出內容
|
|
|
785 |
echo $multiDiv["content"];
|
|
|
786 |
|
|
|
787 |
*/
|
|
|
788 |
|
|
|
789 |
/*
|
|
|
790 |
|
|
|
791 |
#提示當前執行的函數
|
|
|
792 |
echo "<hr>frame::multiDiv - testCase 2<br>";
|
|
|
793 |
|
|
|
794 |
#函式說明:
|
|
|
795 |
#建立多個用div做成的frame.
|
|
|
796 |
#回傳結果:
|
|
|
797 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗.
|
|
|
798 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
799 |
#$result["error"],錯誤訊息提示.
|
|
|
800 |
#$result["content"],div frame的語法.
|
|
|
801 |
#必填參數:
|
|
|
802 |
#$conf["id"],字串陣列,每個div frame的id.
|
|
|
803 |
$conf["id"]=array("A","B");
|
|
|
804 |
#可省略參數:
|
|
|
805 |
#$conf["content"],二維字串陣列,要放入到每個frame的內容,預設不使用,若有個要放有的不要放內容,則不放內容的元素設為null.
|
|
|
806 |
$conf["content"][]=array("a<br>","a<br>","a<br>","a<br>");
|
|
|
807 |
$conf["content"][]=array("b<br>","b<br>","b<br>","b<br>","b<br>","b<br>","b<br>","b<br>","b<br>","b<br>","b<br>","b<br>");
|
|
|
808 |
#$conf["oneScreenSize"],字串陣列,各個frame是否要為視窗的高度,"true"代表要;"false"代表不要。裡面的div元素也會變成跟視窗一樣高.內部的div要使用line-height:normal樣式來取消效果.
|
|
|
809 |
#$conf["oneScreenSize"]=array("");
|
|
|
810 |
#$conf["height"],字串陣列,各個frame的高度,若不設置則請給予null,若 "oneScreenSize" 設置為 "true",則忽略本參數.
|
|
|
811 |
#$conf["height"]=array("");
|
|
|
812 |
#$conf["div2heightIsSeeHeightLessDiv1height"],字串,"true"代表第2個 div frame如果要跟第1個 div frame 來動態調整高度為用戶看到的高度減去第1個 div frame高度;預設為"false"代表不使用.若 "content" 的元素數量不等於2則會強制為"false".
|
|
|
813 |
#$conf["div2heightIsSeeHeightLessDiv1height"]="false";
|
|
|
814 |
$multiDiv=frame::multiDiv($conf);
|
|
|
815 |
unset($conf);
|
|
|
816 |
|
|
|
817 |
#如果設置失敗
|
|
|
818 |
if($multiDiv["status"]==="false"){
|
|
|
819 |
|
|
|
820 |
#印出內容
|
|
|
821 |
var_dump($multiDiv);
|
|
|
822 |
|
|
|
823 |
#停止執行
|
|
|
824 |
exit;
|
|
|
825 |
|
|
|
826 |
}#if end
|
|
|
827 |
|
|
|
828 |
#印出內容
|
|
|
829 |
echo $multiDiv["content"];
|
|
|
830 |
|
|
|
831 |
*/
|
|
|
832 |
|
|
|
833 |
/*
|
|
|
834 |
|
|
|
835 |
#提示當前執行的函數
|
|
|
836 |
echo "<hr>frame::multiDiv - testCase 3<br>";
|
|
|
837 |
|
|
|
838 |
#函式說明:
|
|
|
839 |
#建立多個用div做成的frame.
|
|
|
840 |
#回傳結果:
|
|
|
841 |
#$result["status"],執行成功或失敗,成功為"true";"false"為失敗.
|
|
|
842 |
#$result["functin"],字串,當前函數的名稱.
|
|
|
843 |
#$result["error"],錯誤訊息提示.
|
|
|
844 |
#$result["content"],div frame的語法.
|
|
|
845 |
#必填參數:
|
|
|
846 |
#$conf["id"],字串陣列,每個div frame的id.
|
|
|
847 |
$conf["id"]=array("A","B");
|
|
|
848 |
#可省略參數:
|
|
|
849 |
#$conf["content"],二維字串陣列,要放入到每個frame的內容,預設不使用,若有個要放有的不要放內容,則不放內容的元素設為null.
|
|
|
850 |
$conf["content"][]=array("a<br>","a<br>","a<br>","a<br>");
|
|
|
851 |
$conf["content"][]=array("b<br>","b<br>","b<br>","b<br>","b<br>","b<br>","b<br>","b<br>","b<br>","b<br>","b<br>","b<br>");
|
|
|
852 |
#$conf["oneScreenSize"],字串陣列,各個frame是否要為視窗的高度,"true"代表要;"false"代表不要。裡面的div元素也會變成跟視窗一樣高.內部的div要使用line-height:normal樣式來取消效果.
|
|
|
853 |
#$conf["oneScreenSize"]=array("");
|
|
|
854 |
#$conf["height"],字串陣列,各個frame的高度,若不設置則請給予null,若 "oneScreenSize" 設置為 "true",則忽略本參數.
|
|
|
855 |
$conf["height"]=array("100px",null);
|
|
|
856 |
#$conf["div2heightIsSeeHeightLessDiv1height"],字串,"true"代表第2個 div frame如果要跟第1個 div frame 來動態調整高度為用戶看到的高度減去第1個 div frame高度;預設為"false"代表不使用.若 "content" 的元素數量不等於2則會強制為"false".
|
|
|
857 |
$conf["div2heightIsSeeHeightLessDiv1height"]="true";
|
|
|
858 |
$multiDiv=frame::multiDiv($conf);
|
|
|
859 |
unset($conf);
|
|
|
860 |
|
|
|
861 |
#如果設置失敗
|
|
|
862 |
if($multiDiv["status"]==="false"){
|
|
|
863 |
|
|
|
864 |
#印出內容
|
|
|
865 |
var_dump($multiDiv);
|
|
|
866 |
|
|
|
867 |
#停止執行
|
|
|
868 |
exit;
|
|
|
869 |
|
|
|
870 |
}#if end
|
|
|
871 |
|
|
|
872 |
#印出內容
|
|
|
873 |
echo $multiDiv["content"];
|
|
|
874 |
|
|
|
875 |
*/
|
|
|
876 |
|
|
|
877 |
?>
|