脚本动态生成VML_VML相关
我们编写 VML 很重要的就是要和 数据库结合,如果和数据库结合了,读数据和把数据转换成 VML 变成了两部分。如果直接使用 ASP 生成 包含很多 VML 的页面,一旦数据量多了,整个页面就变得很庞大,下载速度慢了,IE解释代码的速度也慢了,所以用脚本动态生成 VML 变得非常重要了。
用 VML 画一个示意图,可以更明确上面的意义:
前面的图文简单的说就是:使用一个 Iframe 做后台,前台用脚本生成。也许担心,后台已经完成了,但前台还没有初始化的情况,你可以放心,因为读数据的过程肯定相对要慢,如果担心数据量少,只要你把脚本放在 Body 前面,Iframe 放在 Body 的最后面,就不会产生同步错误的问题了。
现在来具体讲讲如何用脚本动态产生 VML 。其实这和用脚本动态产生 HTML 是一样的过程。
相应的在 readData.asp 里面:
<script></script>
'数据库连接部分
'读数据部分
Do Until rs.EOF
%>
parent.createPoint(x%>,y%>,value%>);
Loop
'数据库关闭部分
%>
上面的颜色采用 HomeSite 4.5.2风格
我们一开始就有了 Group1 ,所有以后动态生成的 VML 直接插入到 Group1 的后面就可以了。曾经做了三个实验,第一个是普通的,用ASP生成 VML 代码;第二个是不用Iframe,在同一个页面生成脚本;第三个就是上面的例子,使用Iframe 产生脚本。结果在大数据量的条件下,效率最高的是第三个,其次是第二个,第一个有明显的慢的感觉。
接下来的一节,将讲述VML最激动人心的功能,放大缩小!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The Svelte transition API provides a way to animate components when they enter or leave the document, including custom Svelte transitions.

If you’ve recently started working with GraphQL, or reviewed its pros and cons, you’ve no doubt heard things like “GraphQL doesn’t support caching” or

With the recent climb of Bitcoin’s price over 20k $USD, and to it recently breaking 30k, I thought it’s worth taking a deep dive back into creating Ethereum

How much time do you spend designing the content presentation for your websites? When you write a new blog post or create a new page, are you thinking about

The article discusses using CSS for text effects like shadows and gradients, optimizing them for performance, and enhancing user experience. It also lists resources for beginners.(159 characters)

No matter what stage you’re at as a developer, the tasks we complete—whether big or small—make a huge impact in our personal and professional growth.

npm commands run various tasks for you, either as a one-off or a continuously running process for things like starting a server or compiling code.

I'd say "website" fits better than "mobile app" but I like this framing from Max Lynch:
