|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>邮箱地址转换工具</title>
<style type="text/css">
<!--
body {
margin-left: 6px;
margin-top: 6px;
margin-right: 6px;
margin-bottom: 6px;
line-height:20px;
}
.STYLE1 {color: #FF0000}
-->
</style>
<script language="JavaScript" type="text/javascript">
//剪贴板
function CopyToClipboard(meintext)
{
if (window.clipboardData)
{
// the IE-manier
window.clipboardData.setData("Text", meintext);
}
else if (window.netscape)
{
// dit is belangrijk maar staat nergens duidelijk vermeld:
// you have to sign the code to enable this, or see notes below
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
// maak een interface naar het clipboard
var clip = Components.classes['@mozilla.org/widget/clipboard;1']
.createInstance(Components.interfaces.nsIClipboard);
if (!clip) return;
//alert(clip);
// maak een transferable
var trans = Components.classes['@mozilla.org/widget/transferable;1']
.createInstance(Components.interfaces.nsITransferable);
if (!trans) return;
// specificeer wat voor soort data we op willen halen; text in dit geval
trans.addDataFlavor('text/unicode');
// om de data uit de transferable te halen hebben we 2 nieuwe objecten
// nodig om het in op te slaan
var str = new Object();
var len = new Object();
var str = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsString);
var copytext=meintext;
str.data=copytext;
trans.setTransferData("text/unicode",str,copytext.length*2);
var clipid=Components.interfaces.nsIClipboard;
if (!clip) return false;
clip.setData(trans,null,clipid.kGlobalClipboard);
}
else
{
return false;
}
alert("复制成功,请Ctrl+V粘贴到收件人即可!");
return false;
}
</script>
</head>
<body>
<%
function HTMLEncodesend(fString)
' fString = replace(fString, ">", ">")
'fString = replace(fString, "<", "<")
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10), ",")
HTMLEncode = fString
end function
dim aaaa,klist
emaillist=""
if request("action")="send" then
content=LCase(request.form("content"))
content=HTMLEncodesend(content)
sendemail=split(content,",")
'response.write sendemail(112)&"<br>"
klist=0
for i=0 to UBound(sendemail,1)
aaaa=trim(sendemail(i))
if aaaa<>"" then
if chkEmail(aaaa) then
'else
emaillist=emaillist&aaaa&","
klist=klist+1
end if
else
exit for
end if
next
b=len(emaillist)
emaillist=left(emaillist,(b-1))
%>
<div style="width:480px;margin-bottom:16px;">
<textarea name="contentlist" cols="120" rows="5" onclick="CopyToClipboard('<%=emaillist%>')"><%response.write emaillist%></textarea>
</div>
将上面的邮件地址拷到 收件人即可!
<%
response.write "共转换有<font color=red>"&klist&"个</font>邮件"
else
end if
'邮箱验证过滤
function chkEmail(email)
on error resume next
dim i,l,pos1,pos2
chkEmail=true
if isnull(email) then chkEmail=false:exit function
pos1= instr(email,"@")
pos2=instrRev(email,".")
if not(pos1>0) or not (pos2>0) or pos1>pos2 then
chkEmail=false
end if
if err.number<>0 then err.clear
end function
%>
<span class="STYLE1">最后面如果有逗号请去掉</span>
<form action="?action=send" method="post">
<p>邮件地址转换工具<br />
<textarea name="content" cols="30" rows="16"></textarea>
限30个转换</p>
<p>
<input type="submit" name="Submit" value="转换提交">
</p>
</form>
</body>
</html> |
|