一个很有深度的问题:如何在网页中通过点击button调用程序把本网页另存为另一个网页? <input type=button onclick="document.execCommand('SaveAs');"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 需要提醒的是 我希望能够在客户端点饥这个button 网页可以自动存在服务器上的某个目录下,而网页可能包括各种网页元素,我的程序使用java. 用Applet先下载public void ReadURL(String strURL) { try { int iHttpResult; URL m_URL=new URL(strURL); URLConnection m_URLConn=m_URL.openConnection(); m_URLConn.connect(); HttpURLConnection m_HttpConn=(HttpURLConnection)m_URLConn; iHttpResult=m_HttpConn.getResponseCode(); if(iHttpResult!=HttpURLConnection.HTTP_OK) JOptionPane.showMessageDialog(this,"无法连接..."); else { int iFileSize=m_URLConn.getContentLength(); InputStreamReader m_Reader=new InputStreamReader(m_URLConn.getInputStream()); char[] Buffer=new char[2048]; int iNum=0; while(iNum>-1) { iNum=m_Reader.read(Buffer); if(iNum<0)break; //JOptionPane.showMessageDialog(this,new String(Buffer,0,iNum)); } m_Reader.close(); } } catch(Exception e) { JOptionPane.showMessageDialog(this,e.getMessage()); } }再上传[跟下载一样了].服务器用JSP或者Servlet来接收 ASP:可以看看这文章http://www.csdn.net/develop/read_article.asp?id=22086 .net的tab样式 功能的实现 求教 !! 怎么我这个取到的link都是underfine的? 关于ExtJS的求助 请教一下javascript能不能转成.NET或不客户端显示? 请教一个JQUERY问题。。 问下这段复制代码的代码是什么意思? 传参问题? select下拉选择宽显示问题 help? 关于监测 iframe 的页面刷新或改变的问题 请问怎么样得到多行文本框中光标的位置/选择的文本? 为什么IE5.0不支持window.location.href='aa.htm'?在线等待 IE无法显示JAVASCRIPT编写的树?
先下载
public void ReadURL(String strURL)
{
try
{
int iHttpResult;
URL m_URL=new URL(strURL);
URLConnection m_URLConn=m_URL.openConnection();
m_URLConn.connect();
HttpURLConnection m_HttpConn=(HttpURLConnection)m_URLConn;
iHttpResult=m_HttpConn.getResponseCode();
if(iHttpResult!=HttpURLConnection.HTTP_OK)
JOptionPane.showMessageDialog(this,"无法连接...");
else
{
int iFileSize=m_URLConn.getContentLength();
InputStreamReader m_Reader=new InputStreamReader(m_URLConn.getInputStream());
char[] Buffer=new char[2048];
int iNum=0;
while(iNum>-1)
{
iNum=m_Reader.read(Buffer);
if(iNum<0)break;
//JOptionPane.showMessageDialog(this,new String(Buffer,0,iNum));
}
m_Reader.close();
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(this,e.getMessage());
}
}
再上传[跟下载一样了].服务器用JSP或者Servlet来接收
http://www.csdn.net/develop/read_article.asp?id=22086