word、ppt、excle 转换html,采用jacob
下载 jacob-1.15-M3
地址http://sourceforge.net/projects/jacob-project/
开发工具 MyEclipse8.0 绿色版、Tomcat 6.0 绿色版,JDK 1.6,XP系统,J2EE项目
在MyEclipse中配置Tomcat,使用自己安装的JDK
接着配置MyEclipse 的JRE
Window---Preferences--Java---Installed JREs--选择之前配置Tomcat时加入的jdk
把jacob-1.15-M3-x86.dll 放到这目录下
C:\Program Files\Java\jdk1.6.0_10\jre\bin
把jacob.jar 放到这目录下
D:\tomcat6\lib
Jacob2Html.java 这个类是在网上找的,谁写了,我记不得了。
package jacob;
//import org.apache.commons.logging.Log;
//import org.apache.commons.logging.LogFactory;
//import com.hz.dao.NoticeDAO;
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.Dispatch;
import com.jacob.com.Variant;
public class Jacob2Html
{
// private static final Log log = LogFactory.getLog(Jacob2Html.class);
/**
* PowerPoint转成HTML
* @param pptPath PowerPoint文件全路径
* @param htmlfile 转换后HTML存放路径
*/
public static void pptToHtml(String pptPath, String htmlPath)
{
ActiveXComponent offCom = new ActiveXComponent("PowerPoint.Application");
try
{
offCom.setProperty("Visible", new Variant(true));
Dispatch excels = offCom.getProperty("Presentations").toDispatch();
Dispatch excel = Dispatch.invoke(excels,
"Open",Dispatch.Method, new Object[] { pptPath, new Variant(false), new Variant(false) }, new int[1]).toDispatch();
&nbs
相关文档:
asp.net 获取html控件的值的代码如下:
WebForm1.aspx:
< INPUT ID="TXT" TYPE="TEXT" RUNAT="SERVER" VALUE="AAAAAA">
< INPUT TYPE="BUTTON" RUNAT="SERVER" VALUE="BTNTEST" ID="BUTTON1"&nb ......
定义和用法
<!DOCTYPE> 声明位于文档中的最前面的位置,处于 <html> 标签之前。此标签可告知浏览器文档使用哪种 HTML 或 XHTML 规范。
该标签可声明三种 DTD 类型,分别表示严格版本、过渡版本以及基于框架的 HTML 文档。
以下面这个 <!DOCTYPE> 标签为例:
<!DOCTYPE html
PUBLIC "-//W3C//DT ......
<?php
$s = <<<html
<html>
<head>
<title>nested tag test</title>
<mce:script type="text/javascript"><!--
alert('fdsafdasfasd');
// --></mce:script>
</head>
<body>
<div id=0>
<div id=1><img name="im ......
我们常常把一组集合放到每个页面的下拉框中,这里利用struts1的html:optionsCollection可以省很多事。
举个例子:
写一个公共静态方法:
public static Collection<LabelValueBean> getAllType() {
Collection<LabelValueBean> col = new ArrayList<LabelValueBean>();
col.add(new LabelValueBean( ......
label 的title属性相当于tooltip,鼠标放上去会显示title属性的值
title,label,entitle,name的区别
title 题目,标题
label (商品/产品)标签
entitle 动词,给...称号,给...权利
name 姓名,名称
alt属性和title属性
原文:http://www.456bereastreet.com/archive/200412/the_alt_and_title_attributes/
翻译 ......