求VB一代码:用VB创建一文本文件并往里写入一段代码数据

来源:百度知道 编辑:UC知道 时间:2024/05/16 17:52:33
要写入的代码数据为:

<table border="0" width="280" id="myexample" style="border:1px solid red; " cellspacing="0" cellpadding="3">
<tr>
<td>网页设计师...</td>
</tr>
</table>
<script language="JavaScript1.2">
function flashit(){
if (!document.all)
return
if (myexample.style.borderColor=="red")
myexample.style.borderColor="white"
else
myexample.style.borderColor="red"
}
setInterval("flashit()", 500)
</script>

实现方法如下 :
1、在窗体上添加text1控件,并把上面文本复制到text1.text中;
2、写入文本文件:
dim i as integer
i=freefile
open "c:\1.txt" for output as #i
print #i,text1.text
close #i