国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看
打開APP
未登錄
開通VIP,暢享免費(fèi)電子書等14項超值服
開通VIP
首頁
好書
留言交流
下載APP
聯(lián)系客服
常用的 Javascript 操作匯總 (五)
WindySky
>《技巧總結(jié)》
2009.06.24
關(guān)注
45
動態(tài)復(fù)制文本框內(nèi)容
1
:
<
form name
=
”myForm”
>
2
: Enter some Text:
<
input type
=
”text” name
=
”myText”
><
br
>
3
: Copy Text:
<
input type
=
”text” name
=
”copyText”
>
4
:
</
form
>
5
:
<
a href
=
”#” onClick
=
”document.myForm.copyText.value
=
6
: document.myForm.myText.value;”
>
Copy Text Field
</
a
>
46
偵測文本框的變化
1
:
<
form name
=
”myForm”
>
2
: Enter some Text:
<
input type
=
”text” name
=
”myText” onChange
=
”alert(
this
.value);”
>
3
:
</
form
>
47
訪問選中的Select
1
:
<
form name
=
”myForm”
>
2
:
<
select name
=
”mySelect”
>
3
:
<
option value
=
”First Choice”
>
1
</
option
>
4
:
<
option value
=
”Second Choice”
>
2
</
option
>
5
:
<
option value
=
”Third Choice”
>
3
</
option
>
6
:
</
select
>
7
:
</
form
>
8
:
<
a href
=
'#' onClick
=
'alert(document.myForm.mySelect.value);'
>
Check Selection List
</
a
>
48
動態(tài)增加Select項
1
:
<
form name
=
”myForm”
>
2
:
<
select name
=
”mySelect”
>
3
:
<
option value
=
”First Choice”
>
1
</
option
>
4
:
<
option value
=
”Second Choice”
>
2
</
option
>
5
:
</
select
>
6
:
</
form
>
7
:
<
script language
=
”JavaScript”
>
8
: document.myForm.mySelect.length
++
;
9
: document.myForm.mySelect.options[document.myForm.mySelect.length
-
1
].text
=
“
3
”;
10
: document.myForm.mySelect.options[document.myForm.mySelect.length
-
1
].value
=
“Third Choice”;
11
:
</
script
>
49
驗證表單字段
1
:
<
script language
=
”JavaScript”
>
2
:
function
checkField(field)
{
3
:
if
(field.value
==
“”)
{
4
: window.alert(“You must enter a value
in
the field”);
5
: field.focus();
6
: }
7
: }
8
:
</
script
>
9
:
<
form name
=
”myForm” action
=
”target.html”
>
10
: Text Field:
<
input type
=
”text” name
=
”myField”onBlur
=
”checkField(
this
)”
>
11
:
<
br
><
input type
=
”submit”
>
12
:
</
form
>
50
驗證Select項
1
:
function
checkList(selection)
{
2
:
if
(selection.length
==
0
)
{
3
: window.alert(“You must make a selection from the list.”);
4
:
return
false
;
5
: }
6
:
return
true
;
7
: }
51
動態(tài)改變表單的action
1
:
<
form name
=
”myForm” action
=
”login.html”
>
2
: Username:
<
input type
=
”text” name
=
”username”
><
br
>
3
: Password:
<
input type
=
”password” name
=
”password”
><
br
>
4
:
<
input type
=
”button” value
=
”Login” onClick
=
”
this
.form.submit();”
>
5
:
<
input type
=
”button” value
=
”Register” onClick
=
”
this
.form.action
=
‘register.html’;
this
.form.submit();”
>
6
:
<
input type
=
”button” value
=
”Retrieve Password” onClick
=
”
this
.form.action
=
‘password.html’;
this
.form.submit();”
>
7
:
</
form
>
52
使用圖像按鈕
1
:
<
form name
=
”myForm” action
=
”login.html”
>
2
: Username:
<
input type
=
”text” name
=
”username”
><
br
>
3
: Password:
<
input type
=
”password”name
=
”password”
><
br
>
4
:
<
input type
=
”image” src
=
"
/”login.gif
"
” value
=
”Login”
>
5
:
</
form
>
6
:
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點擊舉報
。
打開APP,閱讀全文并永久保存
查看更多類似文章
猜你喜歡
類似文章
php和javascript之間變量的傳遞實現(xiàn)代碼
JavaScript
全新java大數(shù)據(jù)教程之JavaScript表單
黑狐貍的BUG集 ? jQuery實現(xiàn)Ajax無刷新文件上傳
【轉(zhuǎn)載】php和JS實現(xiàn)表單多按鈕提交action的方法
javascript表單之間的數(shù)據(jù)傳遞_Javascript教程_www.knowsky....
更多類似文章 >>
生活服務(wù)
首頁
萬象
文化
人生
生活
健康
教育
職場
理財
娛樂
藝術(shù)
上網(wǎng)
留言交流
回頂部
聯(lián)系我們
分享
收藏
點擊這里,查看已保存的文章
導(dǎo)長圖
關(guān)注
一鍵復(fù)制
下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!
聯(lián)系客服
微信登錄中...
請勿關(guān)閉此頁面
先別劃走!
送你5元優(yōu)惠券,購買VIP限時立減!
5
元
優(yōu)惠券
優(yōu)惠券還有
10:00
過期
馬上使用
×