网站打开页面 类似窗口
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1"><title>
</title><link href="../Css/wftopenopen/basic.css" rel="stylesheet" type="text/css" />
<script src="../js/main.js" type="text/javascript"></script>
<script type="text/javascript" src="../js/JSLoader.js"></script>
<script src="../js/jcore.js" type="text/javascript"></script>
<script src="../js/json2.js" type="text/javascript"></script>
<script src="../js/jquery.js" type="text/javascript"></script>
<style type="text/css">
html
{
overflow: hidden;
}
login, .login01
{
padding: 10px;
width: 336px;
z-index: 9999;
}
.login_box
{
background: none repeat scroll 0 0 #fff;
border: 1px solid #c7c5c5;
margin: 0 auto;
padding-bottom: 20px;
}
.login_box a.close-btn, .login_box a.img01
{
float: right;
padding-right: 10px;
position: relative;
top: -22px;
}
.login_box h1
{
background: none repeat scroll 0 0 #379cef;
color: #fff;
font-family: Arial;
font-size: 14px;
height: 30px;
line-height: 30px;
padding-right: 12px;
text-align: center;
}
.flclfloat
{
width: 340px;
}
.flclfloat h2
{
font-size: 12px;
font-weight: normal;
line-height: 24px;
padding-bottom: 4px;
padding-left: 30px;
padding-right: 30px;
padding-top: 10px;
text-align: center;
margin-top: 20px;
}
.flclfloat h3
{
font-size: 12px;
font-weight: normal;
height: 26px;
line-height: 26px;
padding-bottom: 4px;
padding-left: 30px;
margin-top: 5px;
}
.flclfloat h3 span
{
color: #cf2849;
font-size: 14px;
padding-left: 6px;
padding-right: 6px;
}
.flclfloat h3 font
{
color: #cf2849;
font-size: 12px;
}
.flclfloat h3 a
{
margin-left: 6px;
margin-right: 6px;
}
.flclfloat p
{
font-size: 12px;
font-weight: normal;
height: 30px;
line-height: 30px;
padding-left: 30px;
}
.flclfloat p input
{
float: left;
}
.flclfloat p span
{
float: left;
margin-right: 30px;
margin-top: -8px;
padding-left: 4px;
}
.flclfloat h5 img
{
margin-top: -8px;
}
.float
{
padding-left: 40px;
}
.flclfloat h4
{
height: 26px;
line-height: 26px;
margin-bottom: 10px;
padding-left: 30px;
}
.flclfloat h4 div
{
float: left;
}
.flclfloat h4 img
{
float: left;
}
.flclfloat img
{
vertical-align: top;
}
.flclfloat h4 span
{
color: #f00;
}
#screen
{
background-color: #eeeeee;
display: none;
height: 100%;
left: 0;
opacity: 0.6;
position: absolute;
top: 0;
width: 100%;
z-index: 9998;
filter: alpha(opacity=60);
}
.div01
{
cursor: pointer;
margin-left: 30px;
float: left;
width: 104px;
height: 22px;
background: url("images/btn_fill.jpg") no-repeat;
}
.div01:hover
{
cursor: pointer;
margin-left: 30px;
float: left;
width: 104px;
height: 22px;
background: url("images/btn_fill.jpg") 0 -44px no-repeat;
}
.div01 p
{
text-align: center;
line-height: 22px;
color: #000000;
padding-left: 0px;
}
.div02
{
cursor: pointer;
margin-left: 10px;
float: left;
width: 104px;
height: 22px;
background: url("images/btn_fill.jpg") no-repeat;
}
.div02:hover
{
cursor: pointer;
margin-left: 10px;
float: left;
width: 104px;
height: 22px;
background: url("images/btn_fill.jpg") 0 -44px no-repeat;
}
.div02 p
{
text-align: center;
line-height: 22px;
color: #000000;
padding-left: 0px;
}
.disablediv
{
background: url("images/btn_fill.jpg") 0 -22px no-repeat;
}
.disablediv:hover
{
background: url("images/btn_fill.jpg") 0 -22px no-repeat;
}
#code
{
font-family: Arial;
font-style: italic;
font-weight: bold;
border: 0;
letter-spacing: 2px;
color: blue;
width: 50px;
}
</style>
<script>
//图层居中方法
jQuery.fn.center = function (loaded) {
var obj = this;
body_width = parseInt(jq(window).width());
body_height = parseInt(jq(window).height());
block_width = parseInt(obj.width());
block_height = parseInt(obj.height());
left_position = parseInt((body_width / 2) - (block_width / 2));
if (body_width < block_width) { left_position = 0 };
top_position = parseInt((body_height / 2) - (block_height / 2));
if (body_height < block_height) { top_position = 300 };
if (!loaded) {
obj.css({ 'position': 'absolute' });
obj.css({ 'top': top_position, 'left': left_position });
jq(window).bind('resize', function () {
obj.center(!loaded);
});
jq(window).bind('scroll', function () {
obj.center(!loaded);
});
} else {
obj.stop();
obj.css({ 'position': 'absolute' });
obj.animate({ 'top': top_position, 'left': left_position }, 200, 'linear');
}
}
function closeDiv(name) {
jq('#' + name).hide();
jq('#screen').hide();
}
function showDiv(item) {
var h = jq(document).height();
jq('#screen').css({ 'height': h });
jq('#screen').show();
jq("#" + item).center();
jq("#" + item).show();
}
function showError(errormessage) {
var h = jq(document).height();
jq("#h2_error").html(errormessage);
jq('#screen').css({ 'height': h });
jq('#screen').show();
jq("#div_ErrorMessage").center();
jq("#div_ErrorMessage").show();
}
</script>
</head>
<body>
<form name="form1" method="post" action="TrialRegister.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTYzMjI4NzM0N2RkDVh6Pk90kLu08ymCO/ZbFBbCgWE=" />
</div>
<div class="container">
<div class="top">
</div>
<div class="top1">
</div>
<div class="content">
<ul>
<li><span>用户姓名<font color="red">*</font></span><input type="text" id="txt_username"
maxlength="50" onfocus="if(this.value=='请输入真实姓名')this.value='';" onblur="if(this.value=='')this.value='请输入真实姓名';"
value="请输入真实姓名" style="color: Gray" />
</li>
<li><span>地区编码<font color="red">*</font></span>
<select id="sl_phonecode" style="margin-left: 10px; margin-top: 10px;">
<option value='+86'>中国(+86)</option><option value='+852'>中国香港特别行政区(+852)</option><option value='+853'>中国澳门特别行政区(+853)</option><option value='+886'>台湾(+886)</option><option value='+61'>澳大利亚(+61)</option><option value='+32'>比利时(+32)</option><option value='+82'>韩国(+82)</option><option value='+1'>美国(+1)</option><option value='+81'>日本(+81)</option><option value='+65'>新加坡(+65)</option><option value='+44'>英国(+44)</option><option value='+355'>阿尔巴尼亚(+355)</option><option value='+213'>阿尔及利亚(+213)</option><option value='+93'>阿富汗(+93)</option><option value='+54'>阿根廷(+54)</option><option value='+353'>爱尔兰(+353)</option><option value='+20'>埃及(+20)</option><option value='+251'>埃塞俄比亚(+251)</option><option value='+372'>爱沙尼亚(+372)</option><option value='+971'>阿拉伯联合酋长国(+971)</option><option value='+297'>阿鲁巴(+297)</option><option value='+968'>阿曼(+968)</option><option value='+376'>安道尔(+376)</option><option value='+244'>安哥拉(+244)</option><option value='+1264'>安圭拉(+1264)</option><option value='+1268'>安提瓜和巴布达(+1268)</option><option value='+43'>奥地利(+43)</option><option value='+994'>阿塞拜疆(+994)</option><option value='+1246'>巴巴多斯(+1246)</option><option value='+675'>巴布亚新几内亚(+675)</option><option value='+1242'>巴哈马(+1242)</option><option value='+375'>白俄罗斯(+375)</option><option value='+1441'>百慕大(+1441)</option><option value='+92'>巴基斯坦(+92)</option><option value='+595'>巴拉圭(+595)</option><option value='+973'>巴林(+973)</option><option value='+507'>巴拿马(+507)</option><option value='+359'>保加利亚(+359)</option><option value='+55'>巴西(+55)</option><option value='+1670'>北马里亚纳群岛(+1670)</option><option value='+229'>贝宁(+229)</option><option value='+354'>冰岛(+354)</option><option value='+267'>博茨瓦纳(+267)</option><option value='+1'>波多黎各(+1)</option><option value='+48'>波兰(+48)</option><option value='+591'>玻利维亚(+591)</option><option value='+501'>伯利兹(+501)</option><option value='+387'>波斯尼亚和黑塞哥维那(+387)</option><option value='+975'>不丹(+975)</option><option value='+226'>布基纳法索(+226)</option><option value='+257'>布隆迪(+257)</option><option value='+850'>朝鲜(+850)</option><option value='+240'>赤道几内亚(+240)</option><option value='+45'>丹麦(+45)</option><option value='+49'>德国(+49)</option><option value='+670'>东帝汶(+670)</option><option value='+228'>多哥(+228)</option><option value='+1767'>多米尼加(+1767)</option><option value='+1809'>多米尼加共和国(+1809)</option><option value='+593'>厄瓜多尔(+593)</option><option value='+291'>厄立特里亚(+291)</option><option value='+7'>俄罗斯(+7)</option><option value='+33'>法国(+33)</option><option value='+298'>法罗群岛(+298)</option><option value='+39'>梵蒂冈(+39)</option><option value='+1767'>法属波利尼西亚(+1767)</option><option value='+679'>斐济(+679)</option><option value='+63'>菲律宾(+63)</option><option value='+358'>芬兰(+358)</option><option value='+238'>佛得角(+238)</option><option value='+500'>福克兰群岛(+500)</option><option value='+220'>冈比亚(+220)</option><option value='+242'>刚果(布)(+242)</option><option value='+243'>刚果(金)(+243)</option><option value='+299'>格陵兰(+299)</option><option value='+1473'>格林纳达(+1473)</option><option value='+995'>格鲁吉亚(+995)</option><option value='+57'>哥伦比亚(+57)</option><option value='+506'>哥斯达黎加(+506)</option><option value='+1671'>关岛(+1671)</option><option value='+53'>古巴(+53)</option><option value='+592'>圭亚那(+592)</option><option value='+509'>海地(+509)</option><option value='+7'>哈萨克斯坦(+7)</option><option value='+382'>黑山共和国(+382)</option><option value='+31'>荷兰(+31)</option><option value='+599'>荷属安的列斯群岛(+599)</option><option value='+504'>洪都拉斯(+504)</option><option value='+233'>加纳(+233)</option><option value='+1'>加拿大(+1)</option><option value='+855'>柬埔寨(+855)</option><option value='+241'>加蓬(+241)</option><option value='+253'>吉布提(+253)</option><option value='+420'>捷克共和国(+420)</option><option value='+996'>吉尔吉斯斯坦(+996)</option><option value='+686'>基里巴斯(+686)</option><option value='+224'>几内亚(+224)</option><option value='+245'>几内亚比绍(+245)</option><option value='+1345'>开曼群岛(+1345)</option><option value='+237'>喀麦隆(+237)</option><option value='+974'>卡塔尔(+974)</option><option value='+61'>科科斯群岛(+61)</option><option value='+385'>克罗地亚(+385)</option><option value='+269'>科摩罗(+269)</option><option value='+254'>肯尼亚(+254)</option><option value='+225'>科特迪瓦(+225)</option><option value='+965'>科威特(+965)</option><option value='+682'>库克群岛(+682)</option><option value='+856'>老挝人民民主共和国(+856)</option><option value='+371'>拉脱维亚(+371)</option><option value='+961'>黎巴嫩(+961)</option><option value='+231'>利比里亚(+231)</option><option value='+218'>利比亚(+218)</option><option value='+423'>列支敦士登(+423)</option><option value='+370'>立陶宛(+370)</option><option value='+40'>罗马尼亚(+40)</option><option value='+352'>卢森堡(+352)</option><option value='+250'>卢旺达(+250)</option><option value='+261'>马达加斯加(+261)</option><option value='+960'>马尔代夫(+960)</option><option value='+356'>马耳他(+356)</option><option value='+60'>马来西亚(+60)</option><option value='+265'>马拉维(+265)</option><option value='+223'>马里(+223)</option><option value='+44'>曼岛(+44)</option><option value='+230'>毛里求斯(+230)</option><option value='+222'>毛里塔尼亚(+222)</option><option value='+389'>马其顿(+389)</option><option value='+692'>马绍尔群岛(+692)</option><option value='+262'>马约特(+262)</option><option value='+1684'>美属萨摩亚(+1684)</option><option value='+1340'>美属维京群岛(+1340)</option><option value='+976'>蒙古(+976)</option><option value='+880'>孟加拉国(+880)</option><option value='+1664'>蒙塞拉特群岛(+1664)</option><option value='+95'>缅甸(+95)</option><option value='+691'>密克罗尼西亚联邦(+691)</option><option value='+51'>秘鲁(+51)</option><option value='+373'>摩尔多瓦(+373)</option><option value='+212'>摩洛哥(+212)</option><option value='+377'>摩纳哥(+377)</option><option value='+258'>莫桑比克(+258)</option><option value='+52'>墨西哥(+52)</option><option value='+264'>纳米比亚(+264)</option><option value='+27'>南非(+27)</option><option value='+672'>南极洲(+672)</option><option value='+674'>瑙鲁(+674)</option><option value='+977'>尼泊尔(+977)</option><option value='+505'>尼加拉瓜(+505)</option><option value='+227'>尼日尔(+227)</option><option value='+234'>尼日利亚(+234)</option><option value='+683'>纽埃(+683)</option><option value='+47'>挪威(+47)</option><option value='+680'>帕劳(+680)</option><option value='+870'>皮特凯恩群岛(+870)</option><option value='+351'>葡萄牙(+351)</option><option value='+46'>瑞典(+46)</option><option value='+41'>瑞士(+41)</option><option value='+503'>萨尔瓦多(+503)</option><option value='+381'>塞尔维亚(+381)</option><option value='+232'>塞拉利昂(+232)</option><option value='+221'>塞内加尔(+221)</option><option value='+357'>塞浦路斯(+357)</option><option value='+248'>塞舌尔群岛(+248)</option><option value='+685'>萨摩亚(+685)</option><option value='+966'>沙特阿拉伯(+966)</option><option value='+590'>圣巴泰勒米(+590)</option><option value='+61'>圣诞岛(+61)</option><option value='+239'>圣多美和普林西比(+239)</option><option value='+290'>圣赫勒拿(+290)</option><option value='+1869'>圣基茨和尼维斯(+1869)</option><option value='+1758'>圣卢西亚(+1758)</option><option value='+1599'>圣马丁(+1599)</option><option value='+378'>圣马力诺(+378)</option><option value='+508'>圣皮埃尔和密克隆(+508)</option><option value='+1784'>圣文森特和格林纳丁斯(+1784)</option><option value='+94'>斯里兰卡(+94)</option><option value='+421'>斯洛伐克(+421)</option><option value='+386'>斯洛文尼亚(+386)</option><option value='+268'>斯威士兰(+268)</option><option value='+249'>苏丹(+249)</option><option value='+677'>所罗门群岛(+677)</option><option value='+252'>索马里(+252)</option><option value='+66'>泰国(+66)</option><option value='+992'>塔吉克斯坦(+992)</option><option value='+676'>汤加(+676)</option><option value='+255'>坦桑尼亚(+255)</option><option value='+1649'>特克斯和凯科斯群岛(+1649)</option><option value='+1868'>特立尼达和多巴哥(+1868)</option><option value='+90'>土耳其(+90)</option><option value='+993'>土库曼斯坦(+993)</option><option value='+216'>突尼斯(+216)</option><option value='+690'>托克劳(+690)</option><option value='+688'>图瓦卢(+688)</option><option value='+681'>瓦利斯和富图纳(+681)</option><option value='+678'>瓦努阿图(+678)</option><option value='+502'>危地马拉(+502)</option><option value='+58'>委内瑞拉(+58)</option><option value='+673'>文莱(+673)</option><option value='+256'>乌干达(+256)</option><option value='+380'>乌克兰(+380)</option><option value='+598'>乌拉圭(+598)</option><option value='+998'>乌兹别克斯坦(+998)</option><option value='+34'>西班牙(+34)</option><option value='+30'>希腊(+30)</option><option value='+687'>新喀里多尼亚(+687)</option><option value='+64'>新西兰(+64)</option><option value='+36'>匈牙利(+36)</option><option value='+963'>叙利亚(+963)</option><option value='+1876'>牙买加(+1876)</option><option value='+374'>亚美尼亚(+374)</option><option value='+967'>也门(+967)</option><option value='+39'>意大利(+39)</option><option value='+964'>伊拉克(+964)</option><option value='+98'>伊朗(+98)</option><option value='+91'>印度(+91)</option><option value='+62'>印度尼西亚(+62)</option><option value='+1284'>英属维京群岛(+1284)</option><option value='+972'>以色列(+972)</option><option value='+962'>约旦(+962)</option><option value='+84'>越南(+84)</option><option value='+260'>赞比亚(+260)</option><option value='+235'>乍得(+235)</option><option value='+350'>直布罗陀(+350)</option><option value='+56'>智利(+56)</option><option value='+236'>中非共和国(+236)</option>
</select>
</li>
<li><span>手机号码<font color="red">*</font></span>
<input type="text" id="txt_mobile" maxlength="50" style="width: 200px;" />
</li>
<li><span>所在公司</span><input type="text" style="margin-left: 17px;" id="txt_company"
maxlength="50" /></li>
<li><span>邮 箱<font color="red">*</font></span><input
type="text" style="margin-left: 12px;" id="txt_email" maxlength="50" /></li>
<li><span>验证码<font color="red">*</font></span><input type="text" id="txt_validate"
style="width: 135px; margin-left: 26px;" onkeyup="validate();" />
<input type="button" id="code" onclick="createCode()" /></li>
<li style="margin-left: 310px; margin-top: 10px;">
<div style="margin-left: 0px;" class="div01" id="div_invite">
<p onclick="javascript:flag=0;UserInvite();">
申请试用</p>
</div>
</li>
</ul>
</div>
<div class="bottom">
<div class="toltip" style="display: none" id="div_tooltip">
<span>您的邀请已发送成功,请再邀请一个吧。</span></div>
<div class="toltip1" style="display: none" id="div_tooltip1">
<span>您的邀请已提交到Wind客服中心,我们会及时与您的好友联系。</span></div>
<div class="toltip1" style="display: none" id="div_tooltip2">
<span>您的好友已经是Wind的客户,再邀请其他好友试试~</span></div>
</div>
</div>
<div style="display: none;" id="screen">
</div>
<div style="position: absolute; z-index: 9999; display: none" id="div_Message" class="login flclfloat">
<div class="login_box">
<h1>
提示</h1>
<a onclick="closeDiv('div_Message');" href="javascript:void(0)" class="img01">
<img width="15" height="15" src="../images/btn_close1.jpg" style="display: none"></a>
<h2>
好友为港澳台或海外客户,请务必填写Email,<br />
方便Ta接收账号及密码
</h2>
<h3>
<div class="div01">
<p onclick="closeDiv('div_Message');">
填写</p>
</div>
<div class="div02">
<p onclick="javascript:flag=1;needemail=0;closeDiv('div_Message');UserInvite();">
提交</p>
</div>
</h3>
</div>
</div>
<div style="position: absolute; z-index: 9999; display: none;" id="div_ErrorMessage"
class="login flclfloat">
<div class="login_box">
<h1>
提示</h1>
<a onclick="closeDiv('div_ErrorMessage');" href="javascript:void(0)" class="img01">
<img width="15" height="15" src="../images/btn_close1.jpg" style="display: none"></a>
<h2 id="h2_error">
</h2>
<h3>
<div class="div01" style="margin-left: 90px;">
<p onclick="closeDiv('div_ErrorMessage');">
确定</p>
</div>
</h3>
</div>
</div>
<script language="javascript">
var needemail = 1;
var caninvite = 1;
var inviteflag = 0;
var flag = 1;
if (GetArgsFromHref(window.location.href, "lan") == "en") {
window.location.href = 'WFTOpen_en.aspx';
}
//从url中得到querystring
function GetArgsFromHref(sHref, sArgName) {
var args = sHref.split("?");
var retval = "";
if (args[0] == sHref) /*参数为空*/
{
return retval; /*无需做任何处理*/
}
var str = args[1];
args = str.split("&");
for (var i = 0; i < args.length; i++) {
str = args[i];
var arg = str.split("=");
if (arg.length <= 1) continue;
if (arg[0] == sArgName) retval = arg[1];
}
return retval;
}
var sh;
function verifyAddress(obj) {
var email = obj;
var pattern = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
flag = pattern.test(email);
if (flag) {
return true;
}
else {
return false;
}
}
function checkMobile(obj) {
var sMobile = obj;
if (!(/^1[3|4|5|6|7|8]\d{9}$/.test(sMobile))) {
return false;
}
else {
return true;
}
}
function checkNumber(obj) {
var sMobile = obj;
if (!(!/^[0-9]*$/.test(sMobile))) {
return false;
}
else {
return true;
}
}
function displayDiv() {
document.getElementById("div_tooltip").style.display = "none";
document.getElementById("div_tooltip1").style.display = "none";
document.getElementById("div_tooltip2").style.display = "none";
//clearInterval(sh);
}
function clearInput() {
document.getElementById("txt_username").value = "";
document.getElementById("txt_mobile").value = "";
document.getElementById("txt_company").value = "";
document.getElementById("txt_email").value = "";
// document.getElementById("txt_mobile0").value = '86';
document.getElementById("txt_validate").value = "";
createCode();
displayDiv();
}
function UserInvite() {
try {
// if (inviteflag == 0) {
// return;
// }
var crmid = '0';
var username = document.getElementById("txt_username").value;
var phonecode = document.getElementById("sl_phonecode").value;
var mobile = document.getElementById("txt_mobile").value;
if (phonecode == "+86") {
mobile = document.getElementById("txt_mobile").value;
}
else {
mobile = phonecode + mobile;
}
mobile = mobile.replace("+", "i");
var company = document.getElementById("txt_company").value;
var email = document.getElementById("txt_email").value;
// var mobile0 = document.getElementById("txt_mobile0").value;
if (username == "" || username == "请输入真实姓名" || strlen(username) > 50) {
showError("请输入正确的用户姓名!");
return;
}
// if (mobile0 == "" || strlen(mobile0) > 10) {
// showError("请输入正确的区号!");
// return;
// }
if (mobile == "" || strlen(mobile) > 50) {
showError("请输入正确的手机号码!");
return;
}
// else {
// //正常用户
// if (mobile0 == "86" || mobile0 == "0086") {
// if (mobile != "" && !checkMobile(mobile)) {
// showError("请输入正确的手机号码!");
// return;
// }
// }
// else { //港澳台用户
// mobile = mobile0 + mobile;
// if (checkNumber(mobile)) {
// showError("请输入正确的手机号码!");
// return;
// }
// }
// }
if (email == "") {
showError("请输入邮箱!");
return;
}
//正常用户判断email
if (email != "" && !verifyAddress(email)) {
showError("请输入正确的邮箱!");
return;
}
if (email == "" && needemail == 1) {
// showDiv('div_Message');
showError("请输入邮箱!");
return;
}
if (email != "" && needemail == 1) {
if (!verifyAddress(email)) {
showError("请输入正确的邮箱!");
return;
}
}
if (!validate()) {
showError("请输入正确的验证码!");
return;
}
displayDiv();
needemail = 1;
caninvite = 0;
//inviteflag = 0;
//showDiv('');
clearInput();
// showError("")
if (flag == 0) {
createCode();
showError("您的试用申请已成功提交,系统核实后会给您发送短信或邮件通知,大约需要5分钟!");
} else {
showError("您的试用申请已成功提交,系统核实后会给您发送短信或邮件通知,大约需要5分钟!");
}
// var parameterArray = new Array(crmid, username, mobile, company, email);
// var dataParameters = { MethodAlias: "UserInvite", Parameter: parameterArray };
sendMessage(crmid, username, mobile, company, email);
} catch (err) {
}
}
//调用短信和邮件接口
function sendMessage(crmid, username, mobile, company, email) {
var xmlhttp;
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("post", encodeURI("../handler/WindOpen.ashx?crmid=" + crmid + "&username=" + username + "&mobile=" + mobile + "&company=" + company + "&email=" + email), true);
xmlhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
xmlhttp.send("");
}
//获取字符串长度
function strlen(str) {
var len;
var i;
len = 0;
for (i = 0; i < str.length; i++) {
if (str.charCodeAt(i) > 255) len += 2; else len++;
}
return len;
}
</script>
<script>
createCode();
var code; //在全局定义验证码
//产生验证码
function createCode() {
code = "";
document.getElementById("txt_validate").value = "";
//document.getElementById("div_invite").className = "div01 disablediv";
inviteflag = 0;
var codeLength = 4; //验证码的长度
var checkCode = document.getElementById("code");
var random = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'); //随机数
for (var i = 0; i < codeLength; i++) {//循环操作
var index = Math.floor(Math.random() * 36); //取得随机数的索引(0~35)
code += random[index]; //根据索引取得随机数加到code上
}
checkCode.value = code; //把code值赋给验证码
}
//校验验证码
function validate() {
var inputCode = document.getElementById("txt_validate").value.toUpperCase(); //取得输入的验证码并转化为大写
if (inputCode.length <= 0) { //若输入的验证码长度为0
//document.getElementById("div_invite").className = "div01 disablediv";
//inviteflag = 0;
return false;
}
else if (inputCode != code) { //若输入的验证码与产生的验证码不一致时
//document.getElementById("div_invite").className = "div01 disablediv";
//inviteflag = 0;
return false;
}
else { //输入正确时
// document.getElementById("div_invite").className = "div01";
// inviteflag = 1;
return true;
}
}
</script>
</form>
</body>
</html>
-----------css---------
-----Css/wftopenopen/basic.css---------------
@charset "utf-8";
/* CSS Document */
body {font-size:12px;margin:0;padding:0; background:#f3f6fb;font-family: "微软雅黑", "黑体", Arial, Helvetica, sans-serif;} /* 2012-2-24 modified*/
a{color:#000; text-decoration:none;}
a:hover {color:#000; text-decoration:underline;}
div,ul,ol,p,dl{margin:0;padding:0;}
ul,ol,dl{height:100%;overflow:hidden;}
li{list-style:none;}
img {border:none; vertical-align:top;}
h1,h2,h3,h4,h5,h6{font:12px Arial, Helvetica, sans-serif;margin:0;padding:0;}
input,select {font:12px Arial, Helvetica, sans-serif; border:0}
.clear{ clear:both;}
.bg{min-width:1280px;background:#f5f5f5}
.bg01{background:#f9f9f9}
.bg02{min-width:820px;background:#f5f8fd}
.container
{
margin:0 auto;
width:650px;
height:500px;
background:#f3f6fb;
}
.container .top
{
background: url(../../images/bg_wftopen.jpg) no-repeat center;
width:650px;
height:170px;
}
.container .top1
{
background: url(../../images/bg_wftopen1.jpg) no-repeat center;
width:650px;
height:55px;
}
.container .top1_en
{
background: url(../../images/bg_wftopen1_en.jpg) no-repeat center;
width:650px;
height:60px;
}
.container .content
{
width :650px;
height:250px;
}
.container .content ul
{
margin-top:10px;
width :650px;
height:260px;
}
.container .content ul li
{
width :650px;
height:35px;
}
.container .content ul li span
{
line-height:35px;
color:#000000;
font-size:16px;
margin-left:190px;
float:left;
}
.container .content ul li input
{
width:200px;
height:25px;
border:solid 1px #cccccc;
margin-top:5px;
margin-left:10px;
line-height:25px;
}
.container .bottom
{
width :650px;
height :40px;
}
.container .bottom .toltip
{
margin-left:180px;
width:320px;
height:23px;
border:solid 1px #f7c387;
background:#fff6df;
}
.container .bottom .toltip span
{
line-height:23px;
color:#666666;
margin-left:80px;
}
.container .bottom .toltip_en
{
margin-left:120px;
width:420px;
height:23px;
border:solid 1px #f7c387;
background:#fff6df;
}
.container .bottom .toltip_en span
{
line-height:23px;
color:#666666;
margin-left:80px;
}
.container .bottom .toltip1
{
margin-left:100px;
width:480px;
height:23px;
border:solid 1px #f7c387;
background:#fff6df;
}
.container .bottom .toltip1 span
{
line-height:23px;
color:#666666;
margin-left:80px;
}
.container .bottom .toltip1_en
{
margin-left:10px;
width:620px;
height:23px;
border:solid 1px #f7c387;
background:#fff6df;
}
.container .bottom .toltip1_en span
{
line-height:23px;
color:#666666;
margin-left:20px;
}
---------------js-------------
window.onerror = function () { return true; }
//判断文本框控件是否有值
function isNoEmpty(txtControl) {
var flag = true;
if (txtControl == null) {
flag = false;
} else {
if (txtControl.value.trim() == "") {
flag = false;
}
}
return flag;
}
//打开页面
function redirectContentPage(pageUrl) {
if (pageUrl.indexOf('?') > 0)
window.open(pageUrl + "&r=" + Math.random(), '_self');
else
window.open(pageUrl + "?r=" + Math.random(), '_self');
}
//获取URL中参数param的值
function getParameter(param) {
var query = window.location.search;
var len = param.length;
var indexStart = query.indexOf(param);
if (indexStart == -1) return "";
indexStart += len + 1;
var indexEnd = query.indexOf("&", indexStart);
if (indexEnd == -1) return query.substring(indexStart);
return query.substring(indexStart, indexEnd);
}
function getQueryString(name)
{
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return "";
}
// 发送微博
function shareWeibo(title)
{
var url = "http://service.t.sina.com.cn/share/share.php?url=" + window.location.href + "&title="+ title +"&pic=&searchPic=false";
window.open(url, "转发至新浪微博");
}
// 发送邮件
function sendEmail(id)
{
var obj = document.getElementById("email");
obj.style.top=(document.documentElement.clientHeight - 140) / 2 + "px";
obj.style.left=(document.documentElement.clientWidth - 500) / 2 + "px";
document.getElementById("email_block").style.display="block";
document.getElementById("email").style.display="block";
document.getElementById("sendEmailNewsId").value=id;
document.getElementById("emailMsgArea").style.display="none";
document.getElementById("emailMsgArea").innerHTML="";
}
function hiddenEmail()
{
document.getElementById("email_block").style.display="none";
document.getElementById("email").style.display="none";
document.getElementById("sendEmailNewsId").value="";
document.getElementById("emailMsgArea").style.display="none";
}
function isIEVersion(version) {
if (window.navigator.userAgent.toLowerCase().indexOf("msie " + version +".0") > 1)
return true;
else
return false;
}
function openUrl(url, height, width)
{
if(height== null) height=800;
if(width== null) width=800;
window.open(url, '_blank','height=' + height + ',width=' + width + ',top=0,left=0,toolbar=no,menubar=no,resizable=yes,location=no,status=no,scrollbars=yes')
}
function showShareDisplay(flag, id)
{
var obj = document.getElementById(id);
obj.style.display=flag ? "block" : "none";
}
function showSelectIcon(obj)
{
obj.style.backgroundImage = obj.style.backgroundImage.replace(".jpg", "_hover.jpg");
}
function showIcon(obj)
{
obj.style.backgroundImage = obj.style.backgroundImage.replace("_hover.jpg", ".jpg");
}
function AuthUrl(url) {
if (url.indexOf("?")) url = url + "&loginName=" + getQueryString("loginName") + "&SystemId=" + getQueryString("SystemId");
else url = url + "?loginName=" + getQueryString("loginName") + "&SystemId=" + getQueryString("SystemId");
return url;
}
//添加cookie
var setCookie = function(c_name, value, expiredays) {
var exdate = new Date();
exdate.setDate(exdate.getDate() + expiredays);
cookieVal = c_name + "=" + escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString());
// alert(cookieVal);
document.cookie = cookieVal;
}
//获取cookie
function getCookie(c_name) {
if (document.cookie.length > 0) {
c_start = document.cookie.indexOf(c_name + "=");
if (c_start != -1) {
c_start = c_start + c_name.length + 1;
c_end = document.cookie.indexOf(";", c_start);
if (c_end == -1) c_end = document.cookie.length;
// document.write(document.cookie.substring(c_start,c_end)+"<br>");
return unescape(document.cookie.substring(c_start, c_end));
}
}
return "";
}
function isMobel(value) {
if (/^13\d{9}$/g.test(value) || (/^15[0-35-9]\d{8}$/g.test(value)) || (/^18[05-9]\d{8}$/g.test(value)) || (/^14\d{9}$/g.test(value))) {
return true;
}
else {
return false;
}
}
function isEmail(email) {
var emailFormat = /^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!\.)){0,61}[a-zA-Z0-9_-]?\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/;
if (!emailFormat.test(email)) {
return false;
}
return true;
}
//js去除空格函数
//此处为string类添加三个成员
String.prototype.trim = function() { return trim(this); }
String.prototype.lTrim = function() { return lTrim(this); }
String.prototype.rTrim = function() { return rTrim(this); }
//此处为独立函数
function lTrim(str) {
if (str == undefined || str == null) return str;
var i;
for (i = 0; i < str.length; i++) {
if (str.charAt(i) != " " && str.charAt(i) != " ") break;
}
str = str.substring(i, str.length);
return str;
}
function rTrim(str) {
if (str == undefined || str == null) return str;
var i;
for (i = str.length - 1; i >= 0; i--) {
if (str.charAt(i) != " " && str.charAt(i) != " ") break;
}
str = str.substring(0, i + 1);
return str;
}
function trim(str) {
return lTrim(rTrim(str));
}
function requestCmd(cmd) {
try {
var json = window.external.ClientFunc(cmd);
// if(debug) alert("requestCmd.returnJson:" + json);
if (json != null || json != undefined || json != null)
json = string2json(json);
else json = undefined;
return json;
}
catch (e) { }
return "";
}
/** * json字符串转化成json对象 * @param {Object} strJson */
function string2json(strJson) {
try {
var j = "(" + strJson + ")"; // 用括号将json字符串括起来
return eval(j); // 返回json对象
}
catch (e) {
return null;
}
}
-------------------------------------js----------------
//JS Loader
//var JcorePath = 'http://nettestfs.wind.com.cn/jcore/jsapi/1.1.1';
var Wind = {};
Wind.UI = {};
Wind.JsLoader = function(path, file, callback) {
this.count = 0;
this.curr = 0;
__self = this;
this.onload = function(src) {
var script = document.createElement("script");
script.type = "text/javascript";
script.language = "javascript";
script.src = src.replace("@", path);
document.getElementsByTagName("head")[0].appendChild(script);
script.onload = script.onreadystatechange = function() {
if (this.readyState && (this.readyState != 'complete' && this.readyState != "loaded")) {
return;
}
else {
__self.curr++;
if (__self.curr >= __self.count)
__self.OnLoaded();
}
}
};
this.OnLoaded = function() {
if (callback) {
callback();
}
};
(function() {
var a = file.split(",")
__self.count = a.length;
for (var no = 0; no < a.length; no++) {
__self.onload(a[no]);
}
})();
};
-------------------js--------------------------
jcore.js json2.js