vfp用代码生成htm
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
vfp用代码生成htm
用vfp代码生成html文件。
非html部分用## 与 ##隔开
SET SAFETY OFF
SET TEXTMERGE ON
SET TEXTMERGE DELIMITERS TO "##","##"
SET TEXTMERGE TO temp.htm noshow
\<html>
\<head>
\<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
\<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
\<meta name="ProgId" content="FrontPage.Editor.Document">
\<title>My First VFP-HTML</title>
\<style>
\<!--
\.boe1 { font-family: Verdana; font-size: 10pt; margin-left: 2 } \.boe3 { font-family: Verdana; font-size: 10pt; text-decoration: line-through; margin-left: 2 }
\.boe2 { font-family: Verdana; font-size: 10pt; color: #FF0000; margin-left: 2 }
\-->
\</style>
\</head>
\<body leftmargin="50" topmargin="50">
\<table border="1" width="94%" cellspacing="0" cellpadding="0" bordercolor="#000000">
\<tr>
\<td width="100%">
\<p style="margin-bottom: -10"><font face="Verdana" size="2"><b>Description</b>\</font></p>
\<p style="margin-left: 3; margin-right: 3"><font face="Verdana" size="3"><b>You can use \the PrintWhen expression to change the fontstyles printed based on the values being \printed. In thiscase, the detail line is printed in red for those products whose in stock is below \the reorder level. Also, any products that have been discontinued are printed in strikeout.\</b></font></td>
\</tr>
\</table>
\<p> </p>
*\<p align="center"><img border="0" src="noname.bmp" width="426" height="30">\</p>
\<p align="center"><img border="0" src="noname.bmp" ></p>
\<table border="0" width="100%">
\<tr>
\<td width="41%"><font face="Verdana" size="3"><b>Product</b></font></td>
\<td width="17%"><font face="Verdana" size="3"><b>In Stock</b></font></td>
\<td width="18%"><font face="Verdana" size="3"><b>On Order</b></font></td>
\<td width="24%"></td>
\</tr>
\</table>
\<table border="2" width="100%" bordercolor="#000000" height="1" cellspacing="0" \cellpadding="0">
\<tr>
\<td width="100%" height="1"></td>
\</tr>
\</table>
\<table border="1" width="100%">
for i=1 to 10
\<tr>
\<td width="8%">第##i##行1列</td>
\<td width="33%">第##i##行2列</td>
\<td width="17%">第##i##行3列</td>
\<td width="19%">第##i##行4列</td>
\<td width="23%">第##i##行5列</td>
\</tr>
endfor
\</table>
\</body>
\</html>
SET TEXTMERGE OFF
SET TEXTMERGE TO
SET TEXTMERGE DELI
DECLARE INTEGER ShellExecute ;
IN SHELL32.DLL ;
INTEGER nWinHandle,;
STRING cOperation,;
STRING cFileName,;
STRING cParameters,;
STRING cDirectory,;
INTEGER nShowWindow
aa=ShellExecute(0,"Open","temp.htm","",".",1)。