txl_js.asp
上传用户:comthink
上传日期:2021-05-06
资源大小:1280k
文件大小:8k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

HTML/CSS

  1. <script language="javascript">
  2. function submitonce(theform){
  3. //if IE 4+ or NS 6+
  4. if (document.all||document.getElementById){
  5. //screen thru every element in the form, and hunt down "submit" and "reset"
  6. for (i=0;i<theform.length;i++){
  7. var tempobj=theform.elements[i]
  8. if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
  9. //disable em
  10. tempobj.disabled=true
  11. }
  12. }
  13. }
  14. function openScript(url, width, height){
  15. var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
  16. }
  17. </script>
  18. <script Language="JavaScript">
  19. //***********默认设置定义.*********************
  20. tPopWait=50;//停留tWait豪秒后显示提示。
  21. tPopShow=5000;//显示tShow豪秒后关闭提示
  22. showPopStep=20;
  23. popOpacity=99;
  24. //***************内部变量定义*****************
  25. sPop=null;
  26. curShow=null;
  27. tFadeOut=null;
  28. tFadeIn=null;
  29. tFadeWaiting=null;
  30. document.write("<style type='text/css'id='defaultPopStyle'>");
  31. document.write(".cPopText {  background-color: #F8F8F5;color:#000000; border: 1px #000000 solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
  32. document.write("</style>");
  33. document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");
  34. function showPopupText(){
  35. var o=event.srcElement;
  36. MouseX=event.x;
  37. MouseY=event.y;
  38. if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
  39.         if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
  40. if(o.dypop!=sPop) {
  41. sPop=o.dypop;
  42. clearTimeout(curShow);
  43. clearTimeout(tFadeOut);
  44. clearTimeout(tFadeIn);
  45. clearTimeout(tFadeWaiting);
  46. if(sPop==null || sPop=="") {
  47. dypopLayer.innerHTML="";
  48. dypopLayer.style.filter="Alpha()";
  49. dypopLayer.filters.Alpha.opacity=0;
  50. }
  51. else {
  52. if(o.dyclass!=null) popStyle=o.dyclass 
  53. else popStyle="cPopText";
  54. curShow=setTimeout("showIt()",tPopWait);
  55. }
  56. }
  57. }
  58. function showIt(){
  59. dypopLayer.className=popStyle;
  60. dypopLayer.innerHTML=sPop;
  61. popWidth=dypopLayer.clientWidth;
  62. popHeight=dypopLayer.clientHeight;
  63. if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
  64. else popLeftAdjust=0;
  65. if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
  66. else popTopAdjust=0;
  67. dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
  68. dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
  69. dypopLayer.style.filter="Alpha(Opacity=0)";
  70. fadeOut();
  71. }
  72. function fadeOut(){
  73. if(dypopLayer.filters.Alpha.opacity<popOpacity) {
  74. dypopLayer.filters.Alpha.opacity+=showPopStep;
  75. tFadeOut=setTimeout("fadeOut()",1);
  76. }
  77. else {
  78. dypopLayer.filters.Alpha.opacity=popOpacity;
  79. tFadeWaiting=setTimeout("fadeIn()",tPopShow);
  80. }
  81. }
  82. function fadeIn(){
  83. if(dypopLayer.filters.Alpha.opacity>0) {
  84. dypopLayer.filters.Alpha.opacity-=1;
  85. tFadeIn=setTimeout("fadeIn()",1);
  86. }
  87. }
  88. document.onmouseover=showPopupText;
  89. function CheckAll(form)  {
  90.   for (var i=0;i<form.elements.length;i++)    {
  91.     var e = form.elements[i];
  92.     if (e.name != 'chkall')       e.checked = form.chkall.checked; 
  93.    }
  94.   }
  95. //下拉菜单相关代码
  96.  var h;
  97.  var w;
  98.  var l;
  99.  var t;
  100.  var topMar = 1;
  101.  var leftMar = -2;
  102.  var space = 1;
  103.  var isvisible;
  104.  var MENU_SHADOW_COLOR='#999999';//定义下拉菜单阴影色
  105.  var global = window.document
  106.  global.fo_currentMenu = null
  107.  global.fo_shadows = new Array
  108. function HideMenu() 
  109. {
  110.  var mX;
  111.  var mY;
  112.  var vDiv;
  113.  var mDiv;
  114. if (isvisible == true)
  115. {
  116. vDiv = document.all("menuDiv");
  117. mX = window.event.clientX + document.body.scrollLeft;
  118. mY = window.event.clientY + document.body.scrollTop;
  119. if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+vDiv.offsetWidth) || (mY < parseInt(vDiv.style.top)-h) || (mY > parseInt(vDiv.style.top)+vDiv.offsetHeight)){
  120. vDiv.style.visibility = "hidden";
  121. isvisible = false;
  122. }
  123. }
  124. }
  125. function ShowMenu(vMnuCode,tWidth) {
  126. vSrc = window.event.srcElement;
  127. vMnuCode = "<table id='submenu' cellspacing=1 cellpadding=3 style='width:"+tWidth+"' class=tableborder1 onmouseout='HideMenu()'><tr height=23><td nowrap align=left class=tablebody1>" + vMnuCode + "</td></tr></table>";
  128. h = vSrc.offsetHeight;
  129. w = vSrc.offsetWidth;
  130. l = vSrc.offsetLeft + leftMar+4;
  131. t = vSrc.offsetTop + topMar + h + space-2;
  132. vParent = vSrc.offsetParent;
  133. while (vParent.tagName.toUpperCase() != "BODY")
  134. {
  135. l += vParent.offsetLeft;
  136. t += vParent.offsetTop;
  137. vParent = vParent.offsetParent;
  138. }
  139. menuDiv.innerHTML = vMnuCode;
  140. menuDiv.style.top = t;
  141. menuDiv.style.left = l;
  142. menuDiv.style.visibility = "visible";
  143. isvisible = true;
  144.     makeRectangularDropShadow(submenu, MENU_SHADOW_COLOR, 4)
  145. }
  146. function makeRectangularDropShadow(el, color, size)
  147. {
  148. var i;
  149. for (i=size; i>0; i--)
  150. {
  151. var rect = document.createElement('div');
  152. var rs = rect.style
  153. rs.position = 'absolute';
  154. rs.left = (el.style.posLeft + i) + 'px';
  155. rs.top = (el.style.posTop + i) + 'px';
  156. rs.width = el.offsetWidth + 'px';
  157. rs.height = el.offsetHeight + 'px';
  158. rs.zIndex = el.style.zIndex - i;
  159. rs.backgroundColor = color;
  160. var opacity = 1 - i / (i + 1);
  161. rs.filter = 'alpha(opacity=' + (100 * opacity) + ')';
  162. el.insertAdjacentElement('afterEnd', rect);
  163. global.fo_shadows[global.fo_shadows.length] = rect;
  164. }
  165. }
  166. //班级留言
  167. var gbooklist= '<a style=font-size:9pt;line-height:14pt; href="g_index.asp">留言首页</a><br><a style=font-size:9pt;line-height:14pt; href="g_post.asp">发表留言</a><br><a style=font-size:9pt;line-height:14pt; href="g_my.asp">我的留言</a><br><a style=font-size:9pt;line-height:14pt; href="g_down.asp">留言下载</a>'
  168. //班级论坛
  169. var bbslist= '<a style=font-size:9pt;line-height:14pt; href="b_index.asp">论坛首页</a><br><a style=font-size:9pt;line-height:14pt; href="b_post.asp">发表新主题</a><br><a style=font-size:9pt;line-height:14pt; href="b_paper.asp">发表小字报</a><br><a style=font-size:9pt;line-height:14pt; href="b_best.asp">论坛精华贴</a><br><a style=font-size:9pt;line-height:14pt; href="b_my.asp">我发表的主题</a>'
  170. //班级相册
  171. var photolist= '<%
  172.      dim photolist
  173.      photolist="<a style=font-size:9pt;line-height:14pt; href=""p_all.asp"">查看所有照片</a><br><a style=font-size:9pt;line-height:14pt; href=""p_send.asp"">上传照片</a><br><a style=font-size:9pt;line-height:14pt; href=""p_my.asp"">我的相册</a><br>"
  174.     set rs=conn.execute("select classid,classname from imgclass order by classid")
  175. do while not rs.eof
  176. photolist=photolist & "<a style=font-size:9pt;line-height:14pt; href=""p_more.asp?classid="&rs(0)&""">"&rs(1)&"</a><br>"
  177. rs.movenext
  178. loop
  179.     response.write photolist
  180. %>'
  181. //个人菜单
  182. var userlist= '<a style=font-size:9pt;line-height:14pt; href="JavaScript:openScript('messanger.asp?action=new',500,400)">发短信</a><br><a style=font-size:9pt;line-height:14pt; href="u_modifymy.asp">基本资料修改</a><br><a style=font-size:9pt;line-height:14pt; href="u_modifypsw.asp">用户密码修改</a><br><a style=font-size:9pt;line-height:14pt; href="U_modifyadd.asp">联系资料修改</a><br><a style=font-size:9pt;line-height:14pt; href="usersms.asp">我的短信管理</a><br><a style=font-size:9pt;line-height:14pt; href="U_myskin.asp">选择界面风格</a>'
  183. //班级名片
  184. var cardlist= '<a style=font-size:9pt;line-height:14pt; href="c_index.asp?orders=1">所有注册用户</a><br><a style=font-size:9pt;line-height:14pt; href="c_index.asp?orders=2">班级成员列表</a><br><a style=font-size:9pt;line-height:14pt; href="c_index.asp?orders=3">班级客人列表</a><br><a style=font-size:9pt;line-height:14pt; href="c_index.asp?orders=4">班级贵宾列表</a><br><a style=font-size:9pt;line-height:14pt; href="c_index.asp?orders=5">大富翁排行榜</a>'
  185. //班级社区
  186. var shequlist= '<a style=font-size:9pt;line-height:14pt; href="s_music.asp">点歌祝福</a><br><a style=font-size:9pt;line-height:14pt; href="s_suggest.asp">意见建议</a>'
  187. </script>