⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 default.aspx

📁 互动留言簿.NET2.0
💻 ASPX
📖 第 1 页 / 共 5 页
字号:
        alert("昵称不能超过12个字符!")
        thisform.username.focus()
          return(false)
      }

   if(thisform.caption.value==""){
        alert("留言主题不能留空!")
        thisform.caption.focus()
        return(false)
      }

   if(thisform.caption.value.length>40){
        alert("留言主题不能超过40字符!")
        thisform.caption.focus()
          return(false)
      }

   if(thisform.content.value==""){
        alert("留言内容不能留空!")
        thisform.content.focus()
          return(false)
      }

   if(thisform.content.value.length>1000){
        alert("留言内容不能超过1000字符!")
        thisform.content.focus()
          return(false)
      }

   if(thisform.email.value!=""&&thisform.email.value.indexOf('@', 0) == -1||thisform.email.value!=""&&thisform.email.value.indexOf(".") == -1){
        alert("Email地址不合法!")
        thisform.email.focus()
          return(false)
      }

  if(thisform.qq.value!=""&&checkqq(thisform.qq.value) == false){
        alert("腾讯QQ号码不合法!")
        thisform.qq.focus()
          return(false)
       }
  thisform.Submit.disabled =true;
  thisform.resetform.disabled =true;
  return true;
}

self.onError=null;

        currentX = currentY = 0;
        whichIt = null;
        lastScrollX = 0; lastScrollY = 0;
        NS = (document.layers) ? 1 : 0;
        IE = (document.all) ? 1: 0;
        <!-- STALKER CODE -->
        function heartBeat() {
                if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; }
            if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }
                if(diffY != lastScrollY) {
                        percent = .1 * (diffY - lastScrollY);
                        if(percent > 0) percent = Math.ceil(percent);
                        else percent = Math.floor(percent);
                                        if(IE) document.all.postcontent.style.pixelTop += percent;
                                        if(NS) document.postcontent.top += percent;
                        lastScrollY = lastScrollY + percent;
            }
                if(diffX != lastScrollX) {
                        percent = .1 * (diffX - lastScrollX);
                        if(percent > 0) percent = Math.ceil(percent);
                        else percent = Math.floor(percent);
                        if(IE) document.all.postcontent.style.pixelLeft += percent;
                        if(NS) document.postcontent.left += percent;
                        lastScrollX = lastScrollX + percent;
                }
        }
        <!-- /STALKER CODE -->
        <!-- DRAG DROP CODE -->

        function grabIt(e) {
                if(IE) {
                        whichIt = event.srcElement;
                        while (whichIt.id.indexOf("postcontent") == -1) {
                                whichIt = whichIt.parentElement;
                                if (whichIt == null) { return true; }
                    }
                        whichIt.style.pixelLeft = whichIt.offsetLeft;
                    whichIt.style.pixelTop = whichIt.offsetTop;
                        currentX = (event.clientX + document.body.scrollLeft);
                           currentY = (event.clientY + document.body.scrollTop);
                } else {
                window.captureEvents(Event.MOUSEMOVE);
                if(checkFocus (e.pageX,e.pageY)) {
                        whichIt = document.postcontent;
                        StalkerTouchedX = e.pageX-document.postcontent.pageX;
                        StalkerTouchedY = e.pageY-document.postcontent.pageY;
                }
                }
            return true;
        }
        function moveIt(e) {
                if (whichIt == null) { return false; }
                if(IE) {
                    newX = (event.clientX + document.body.scrollLeft);
                    newY = (event.clientY + document.body.scrollTop);
                    distanceX = (newX - currentX);    distanceY = (newY - currentY);
                    currentX = newX;    currentY = newY;
                    whichIt.style.pixelLeft += distanceX;
                    whichIt.style.pixelTop += distanceY;
                        if(whichIt.style.pixelTop < document.body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop;
                        if(whichIt.style.pixelLeft < document.body.scrollLeft) whichIt.style.pixelLeft = document.body.scrollLeft;
                        if(whichIt.style.pixelLeft > document.body.offsetWidth - document.body.scrollLeft - whichIt.style.pixelWidth - 20) whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 20;
                        if(whichIt.style.pixelTop > document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5;
                        event.returnValue = false;
                } else {
                        whichIt.moveTo(e.pageX-StalkerTouchedX,e.pageY-StalkerTouchedY);
                if(whichIt.left < 0+self.pageXOffset) whichIt.left = 0+self.pageXOffset;
                if(whichIt.top < 0+self.pageYOffset) whichIt.top = 0+self.pageYOffset;
                if( (whichIt.left + whichIt.clip.width) >= (window.innerWidth+self.pageXOffset-17)) whichIt.left = ((window.innerWidth+self.pageXOffset)-whichIt.clip.width)-17;
                if( (whichIt.top + whichIt.clip.height) >= (window.innerHeight+self.pageYOffset-17)) whichIt.top = ((window.innerHeight+self.pageYOffset)-whichIt.clip.height)-17;
                return false;
                }
            return false;
        }
        function dropIt() {
                whichIt = null;
            if(NS) window.releaseEvents (Event.MOUSEMOVE);
            return true;
        }
        <!-- DRAG DROP CODE -->
        if(NS) {
                window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN);
                window.onmousedown = grabIt;
                 window.onmousemove = moveIt;
                window.onmouseup = dropIt;
        }
        if(IE) {
                document.onmousedown = grabIt;
                 document.onmousemove = moveIt;
                document.onmouseup = dropIt;
        }
        if(NS || IE) action = window.setInterval("heartBeat()",1);

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

//由于双击滚屏与可拖动窗口冲突,如要启用可拖动窗口请将以下代码删除
var currentpos,timer; 
function initialize() { timer=setInterval("scrollwindow()",5);} 
function sc(){clearInterval(timer);}
function scrollwindow() {currentpos=document.body.scrollTop;window.scroll(0,++currentpos);if (currentpos != document.body.scrollTop) sc();} 
document.onmousedown=sc
document.ondblclick=initialize
//由于双击滚屏与可拖动窗口冲突,如要启用可拖动窗口请将以上代码删除
//-->
</script>
</head>
<body topmargin="2">
<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">
  <tr> 
    <td align="center"> 
      <table class="gueststyleline" width="610" border="0" cellpadding="1" cellspacing="0" height="60">
        <tr> 
          <td> 
            <table width="100%" border="0" cellspacing="0" cellpadding="6" class="gueststylebg" height="60">
              <tr> 
                <td align="center" height="60" width="25%"><asp:image id="logo" runat=server/></td>
                <td align="center" height="60" width="75%"><asp:AdRotator id="adshowtop" advertisementfile="adconfig/ad_top.xml" runat=server/></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
      <br>
      <table class="gueststyleline" width="610" border="0" cellpadding="1" cellspacing="0">
        <tr> 
          <td> 
            <table width="100%" border="0" cellspacing="0" cellpadding="6" class="gueststylebg">
              <tr> 
                <td width="25%" align="center" height="32"><a href="default.aspx"><img src="Images/button/button1.gif" border="0" alt="返回首页" align="top"></a></td>
                <td width="25%" align="center" height="32"><a href="javascript:;" onClick="MM_showHideLayers('admin','','hide','postcontent','','show','setup','','hide')"><img src="Images/button/button3.gif" width="92" height="32" border="0" alt="发表留言"></a></td>
                <td align="center" width="25%" height="32"><asp:hyperlink id="linkhome" imageurl="Images/button/button.gif" target="window" text="参观主页" runat=server/></td>
                <td align="center" width="25%" height="32"><a id="goadmin" href="javascript:;" runat=server><asp:image id="setimage" width="92" height="32" runat=server/></a></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<form name="form2" runat=server>
  <%If  request.querystring("replyid")<>"" and  session("isadmin")<>"" Then %>
  <br>
  <table class="gueststyleline" border="0" cellpadding="1" cellspacing="0" width="427" height="246" align="center">
    <tr> 
      <td valign="top" > 
        <table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
          <tr> 
            <td  valign="top"> 
              <table width="100%" border="0" cellpadding="0" cellspacing="0" class="gueststyleline" height="24">
                <tr> 
                  <td align="left" height="21"><img src="Images/icon/write.gif" width="16" height="16"><%if request.querystring("caption")<>"" then %>
                    [回复主题]:<%=request.querystring("caption")%>
                    <%else%>
                    [编辑回复]
                    <%end if%>
                  </td>
                </tr>
              </table>
              <table width="100%" cellpadding="1" cellspacing="0" class="gueststylebg" height="100%">
                <tr> 
                  <td height="221" valign="top"> 
                    <div align="center"><br>
                      留言回复支持HTML贴图及URL自动转换<br>
<%if request.querystring("caption")<>"" then %> 
                      <asp:textbox id="replytextbox" textmode="multiline" rows="10" columns="50" OnTextChanged="postreply" runat=server/>
<%
else
gettext()
%>
<asp:textbox id="modreplys" textmode="multiline" rows="10" columns="50" OnTextChanged="modreply" runat=server/>
<%end if%>
<br><br>
                       <asp:button id="submitreply" text="确 定" class="gueststylebg" runat=server/>&nbsp;
                      <input type="reset" name="resetreply" value="重 填" class="gueststylebg">
                    </div>
                  </td>
                </tr>
              </table>
        </table>
      </td>
    </tr>
  </table>
  <%else%>
  <table width="100%" border="0" cellpadding="2" cellspacing="0" align="center">
    <tr> 
      <td align="center"> 
<%
Try 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -