开源零代码开发平台,搜索引擎seo如何优化,wordpress购买资源插件,题库网站建设的绩效指标Crow:设置网站的index.html-CSDN博客 讲述了如何完成一个最简单的网页的路由 很多网页提供了下载功能,怎么实现呢,其实也很简单。 假设网页的目录结构如图 $ tree static static ├── img │ └── goodday.jpg └── index.html //index.html
html
body└── goodday.jpg └── index.html //index.html
html
bodyh1Hello world/h1
img src="/static/img/goodday.jpg" alt="good day" style="width: 500px;" onclick="downloadimg('goodday1.jpg')"scriptfunction downloadFile (data, fileName){var blob = new Blob([data]);var downloadElement = document.createElement('a');var href = window.URL.createObjectURL(blob);downloadElement.href = href;