当前位置:首页
开发技术指南» 文章正文
    引言:

    摘要: 我看了一下源码,不懂: 1,是不是首先把页面分成左右两个框架? 再在左右的两个框架里面各再分成上下两个框架呢? 不知道我说的这点正确吗? 2,那个关闭和那个显示导航栏的按钮是怎么做的代码啊?我看不懂,可以帮我解释下吗?特别是点那个显示导航栏按钮后他本身隐藏起来了。 找了很多帖子,都没有说清楚 再次发贴,恳请指教!!!多谢 ......
    摘要: 小妹原来一直是搞asp的,现在准备往jsp方向转,接触了大概有三四天左右,看网上的资料因为有些缺少针对性,有些乱,而且有些问题想具体解决,所以诚心的在csdn拜一位师傅,先送上100分做拜师费用,日后还会有重谢 ......


(求助)如何保存页面部分文字成文件

描述:页面有三段文字,我想通过按钮分别保存为文件  
  问题:目前方法一:<input   type=button   value=另存为   name="rsa"   onclick="document.execCommand(saveas,true,个人私钥.txt)">  
  会把页面所有文字都保存  
  方法二:<%@page   contentType="text/html;charset=gb2312"%>  
  <%String   rsaCer="AAAAAAAAAAAAAA";%>  
  <html>  
  <head>  
  <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312">  
  <title>无标题文档</title>  
  <script>  
  function   bb(rsaCer)  
  {  
  w=window.open()  
  w.document.write(rsaCer)  
  w.close();  
  w.document.execCommand("SaveAs",true,"个人私钥.txt")  
   
  }  
  </script>  
  </head>  
   
  <body>  
  <input   type="hidden"   name="a"   value="<%=rsaCer%>">  
  个人私钥:<input   type=button   value=另存为txt   onclick="bb(<%=rsaCer%>)">  
  <%=rsaCer%>  
  个人证书:    
  BBBBBBBBBBBB  
     
  CA证书:    
   
  CCCCCCCCCCCCCCCCC  
   
  </body>  
  </html>  
   
  这样虽然可可以单独保存文字,但是会开一个新窗口,而且它的属性,我设置了还不能使他看不到  
  哪位仁兄有办法可以让新窗口隐藏或者其他办法解决问题就多多指教!!

NO.1   作者: easyreal

跟着你的思路做可以这样:  
  w=window.open("",   "",   "left=1800,height=1000");  
  w.document.write(rsaCer);  
   
  w.document.execCommand("SaveAs",true,"个人私钥.txt");  
  w.close();  
   
  我这边好像要把w.close()放在后面才行

NO.2   作者: myhyli

<input   type=button   value=另存为   name="rsa"   onclick="test()">  
  <SCRIPT   LANGUAGE="JavaScript">  
  <!--  
  function   test(){  
  document.body.insertAdjacentHTML("beforeEnd","<iframe   name=aaa   id=aaa></iframe>");  
  aaa.document.write("123   asdf   asdf   asdf   asf   dasdf");  
  aaa.document.close();  
  aaa.document.execCommand(saveas,true,个人私钥.txt);  
  document.all("aaa").removeNode(true);  
  }  
  //-->  
  </SCRIPT>  
 


    摘要: 问题描述: 1、访问桌面属性或我的电脑属性时弹出错误框:找不到c:\windows\system32\rundll32.exe。 2、打开任何文件(文件夹出为)或应用程序(包括快捷方式)或执行任何命令都弹出“请选择用于打开该文 件的应用程序”(大意)的对火框。 请高手指点,谢谢。 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE