来源:http://blog.163.com/1314521cj__99/blog/static/104908127200971812415198/
<!--- 留言窗部分开始--->
<LINK rev=stylesheet media=screen href="http://simg.instrument.com.cn/netshow/show31/090105/css/eCustomerService.css" type=text/css rel=stylesheet>
<script src="http://simg.instrument.com.cn/JavaScript/081225/prototype-1602.js" language="javascript" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
function submitMsgForm(){
var name=$("name").value
var tel=$("tel").value
var company=$("company").value
var address=$("address").value
var postcode=$("postcode").value
var Fax=$("Fax").value
var email=$("email").value
var ly=$("ly").value
var IMListID ="WAM101935";
var IMShowNameID="";
if (name=="")
{
alert("请填写您的真实姓名");
$("name").focus();
}
else if(tel=="")
{
alert("请填写您的联系电话");
$("tel").focus();
}
else if(company=="")
{
alert("请填写您的单位/公司");
$("company").focus();
}
else if(ly=="")
{
alert("请填写您的留言内容");
$("ly").focus();
}
else
{
var url = 'Ajax_guestBook.asp';
var pars = 'name='+name+'&rid='+Math.random()+'&tel='+tel+'&company='+company+'&address='+address+'&postcode='+postcode+'&Fax='+Fax+'&email='+email+'&ly='+ly+'&IMListID='+IMListID+'&IMShowNameID='+IMShowNameID;
var myAjax = new Ajax.Request(url,
{method: 'post', parameters: pars, onComplete: function(ajaxobj) {
var errobj = $(ECSUL);
errobj.innerHTML = "<li style='text-align:center;'>"+ajaxobj.responseText+"</li>";
}});
}
}
function changeToclose()
{
document.getElementById("ECS").style.display="none";
}
function changeToMin()
{
document.getElementById("ECScontent").style.display="none";
document.getElementById("ECSMinLinkT").innerHTML="<A class=EToMax id=ECSMinLink title=最小化留言板 οnclick='changeToMax();' href='#'></A>";
}
function changeToMax()
{
document.getElementById("ECScontent").style.display="";
document.getElementById("ECSMinLinkT").innerHTML="<A class=EToMin id=ECSMinLink title=最小化留言板 οnclick='changeToMin();' href='#'></A>";
}
function scrollImg(){
var posX,posY;
if (window.innerHeight) {
posY = window.pageYOffset;
}
else if (document.documentElement && document.documentElement.scrollTop) {
posY = document.documentElement.scrollTop;
}
else if (document.body) {
posY = document.body.scrollTop;
}
posHeight= document.documentElement.clientHeight ;
posSHeight=document.documentElement.scrollHeight ;
var ECS=document.getElementById("ECS");
if (document.getElementById("ECScontent").style.display=="none")
{
ECS.style.top=(posY+posHeight-40)+"px";
}
else
{
ECS.style.top=(posY+posHeight-320)+"px";
}
}
window.setInterval("scrollImg()",10);
</script>
<FORM name=ECSForm>
<DIV class=ECS id=ECS>
<DIV class=ECStitle id=ECStitle>
<UL>
<LI class=ELeft><SPAN class=titleA>产品留言板</SPAN> </LI>
<li class=ERight id="ECSClose"><A class=EToClose id=ECSCloseLink title=关闭留言板 οnclick="changeToclose();" href="#"></A></li>
<LI class=ERight id="ECSMinLinkT"><A class=EToMin id=ECSMinLink title=最小化留言板
οnclick="changeToMin();" href="#"></A></LI>
</UL>
</DIV>
<DIV class=ECScontent id=ECScontent>
<DIV class=EMiddle>
<UL id="ECSUL">
<LI class=name>
<SPAN>姓名:<font color="#FF0000">*</font> </SPAN><INPUT type="text" name="name" id="name" value="" >
</LI>
<LI class=name>
<SPAN>电话:<font color="#FF0000">*</font> </SPAN><INPUT type="text" name="tel" id="tel" value="">
</LI>
<LI class=name><SPAN>单位:<font color="#FF0000">*</font> </SPAN><INPUT type="text" name="company" id="company" value="">
</LI>
<LI class=name><SPAN>地址: </SPAN><INPUT type="text" name="address" id="address" value="" ></LI>
<LI class=name><SPAN>邮编: </SPAN><INPUT type="text" name="postcode" id="postcode" value="" ></LI>
<LI class=name><SPAN>传真: </SPAN><input type="text" name="Fax" id="Fax" value="" /></LI>
<LI class=name><SPAN>Email: </SPAN><INPUT type="text" name="email" id="email" value="" ></LI>
<LI><SPAN style="color:#000000;"> 留言内容:<font color="#FF0000">*</font> </SPAN>
<TEXTAREA id="ly" name="ly"></TEXTAREA>
</LI>
<LI style="text-align:center;"><A id=msgBtn href="javascript:submitMsgForm();"><IMG src="http://simg.instrument.com.cn/netshow/show31/090105/images/send.gif" align=absMiddle></A></LI>
</UL>
</DIV>
<DIV class=EBottom></DIV></DIV>
</DIV>
</FORM>
<!--- 留言窗部分结束--->