查看: 650|回复: 0
|
xml script read txt file?
[复制链接]
|
|
嗨各位大大,以下code是forum抄下来的
http://www.codingforums.com/showthread.php?t=647
假如我要读取在我电脑上的 (C:\Documents and Settings\jeng\Desktop\king.html)的file content, 我必须修改以下那条code
<html xmlns:behave_yaself>
<head>
<title>Behaviors</title>
<script type="text/javascript">
function downloadEnd(e) {
document.all.download.value=e;
}
</script>
<style type="text/css">
textarea {
background-color: #000;
color: #FFF;
scrollbar-face-color: #FFF;
}
</style>
</head>
<body>
<behave_yaself:download id="currFile" style="behavior:url(#default#download);" />
Click <a href="javascript:document.getElementById('currFile').startDownload(location.href,downloadEnd)">here</a>
to start the download.
<br />When the download is finished, the text will be displayed in the <b>TEXTAREA</b> below.
<p><textarea rows="20" cols="40" id="download"></textarea></p>
</body>
</html> |
|
|
|
|
|
|
| |
本周最热论坛帖子
|