网站制作学习网ASP→正文:asp判断email
字体:

asp判断email

ASP 2008/2/2 9:07:15  点击:不统计

<html>

<head>

<script language="JavaScript">

<!-- Hide

function test1(form) {

if (form.text1.value == "")

alert("您 没 写 上 任 何 东 西, 请 再 输 入 一 次 !")

else {

alert("嗨 "+form.text1.value+"! 您 已 输 入 完 成 !");

}

}

function test2(form) {

if (form.text2.value == "" ||

form.text2.value.indexOf('@', 0) == -1)

alert("这 不 是 正 确 的 e-mail address! 请 再 输 入 一 次 !");

else alert("您 已 输 入 完 成 !");

}

// -->

</script>

</head>

<body>

<form name="first">

Enter your name:<br>

<input type="text" name="text1">

<input type="button" name="button1" value="输 入 测 试" onClick="test1(this.form)">

<P>

Enter your e-mail address:<br>

<input type="text" name="text2">

<input type="button" name="button2" value="输 入 测 试" onClick="test2(this.form)">

</body>





48、跑马灯

<html>

<head>

<script language="JavaScript">

<!-- Hide

var scrtxt="怎麽样 ! 很酷吧 ! 您也可以试试."+"Here goes your message the visitors to your

page will "+"look at for hours in pure fascination...";

var lentxt=scrtxt.length;

var width=100;

var pos=1-width;

function scroll() {

pos++;

var scroller="";

if (pos==lentxt) {

pos=1-width;

}

if (pos<0) {

for (var i=1; i<=Math.abs(pos); i++) {

scroller=scroller+" ";}

scroller=scroller+scrtxt.substring(0,width-i+1);

}

else {

scroller=scroller+scrtxt.substring(pos,width+pos);

}

window.status = scroller;

setTimeout("scroll()",150);

}

//-->

</script>

</head>

<body onLoad="scroll();return true;">

这里可显示您的网页 !

</body>

</html>





49、在网页中用按钮来控制前页,后页和主页的显示。

<html>

<body>

<FORM NAME="buttonbar">

<INPUT TYPE="button" VALUE="Back" onClick="history.back()">

<INPUT TYPE="button" VALUE="JS- Home" onClick="location='script.html'">

<INPUT TYPE="button" VALUE="Next" onCLick="history.forward()">

</FORM>

</body>

</html>



·上一篇:自动适用文字行数的多少 >>    ·下一篇:取日期差 >>
推荐文章
最新文章