使用wode另存为web页的功能 XML 相关
2009-03-30 19:09:40 作者:ASP编程 来源:电脑高手哦 浏览次数:0 网友评论 0 条
<p class=MsoNormal align=center style='text-align:center'>
<span lang=EN-US>
<!--[if gte vml 1]>
<v:shape id="_x0000_i1040" type="#_x0000_t75" style='width:290.25pt;height:86.25pt'>
<v:imagedata src=/uploadfile/wangluo_anquan/uploadfile/200903/20090330070940446.png" o:title="W143"/>
</v:shape>
<![endif]-->
<![if !vml]>
<img onclick="fangda_x(this)" width=387 height=115 src=/uploadfile/wangluo_anquan/uploadfile/200903/20090330070942146.jpg" v:shapes="_x0000_i1040">
<![endif]>
</span>
</p>
其中:
<!--[if gte vml 1]> 若支持vml
<![endif]-->
<![if !vml]> 若不支持vml
<![endif]>
注:vml是w3c组织的平面矢量图标准,目前ws对其支持不力,但在office及word中对其有所扩展。
使用时必须有下面的声明
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/tr/rec-html40">
<head>
<style>
v\:* {behavior:url(#default#vml);}
o\:* {behavior:url(#default#vml);}
w\:* {behavior:url(#default#vml);}
.shape {behavior:url(#default#vml);}
</style>
在你的应用中,由于只对img标签进行了处理,而未对支持vml的情况进行加工,所以就会出现你所遇到的情况。
解决的办法有二:
1。去处所有与vml相关的内容。优点是体积变小,缺点是有可能造成显示格式的变化
2。对vml相关部分增加相应处理。优点是修改量小,确保样式,缺点是体积增大
在js文件中增加一个函数
function fangda(the) {
var x_x=parseInt(the.style.width);
var y_x=parseInt(the.style.height);
var i_x=1.2;
if (event.ctrlKey) {
x_x=x_x/i_x;
y_x=y_x/i_x;
}else {
x_x=x_x*i_x;
y_x=y_x*i_x;
}
the.style.width=x_x;
the.style.height=y_x;
}
对html文档的对应部分加入事件处理
<p class=MsoNormal align=center style='text-align:center'>
<span lang=EN-US>
<!--[if gte vml 1]>
<v:shape id="_x0000_i1040" onclick="fangda(this)" type="#_x0000_t75" style='width:290.25pt;height:86.25pt'>
<v:imagedata src=/uploadfile/wangluo_anquan/uploadfile/200903/20090330070940446.png" o:title="W143"/>
</v:shape>
<![endif]-->
<![if !vml]>
<img onclick="fangda_x(this)" width=387 height=115 src=/uploadfile/wangluo_anquan/uploadfile/200903/20090330070942146.jpg" v:shapes="_x0000_i1040">
<![endif]>
</span>
</p>
注意:是加在标签v:shape里,而不是v:imagedata
使用wode另存为web页的功能 XML 相关是www1098t.com的会员在asp编程最新发表的,同时也欢迎你就使用wode另存为web页的功能 XML 相关提问.欢迎来到我们的服务器编程网站查询功能的文章.相关文章
- 微软必应新增导航标签和空间搜索地图功能_互联网...
- 拍照功能很强大 索爱i dou高调亮相卖3480_通信...
- 谷歌推新版Chrome Beta 增网页自动翻译功能_互联...
- 微软近期将推MSN新主页 更新30个功能应用_互联网...
- 分析称RIM应收购Palm 利用WebOS增强黑莓功能_通信...
- Google日历实验一项新功能 重新排程变聪明_产经频...
- 广东联通推免费3G体验卡 无语音短信功能_通信...
- 雅虎邮箱增导入Facebook联系人功能(图)_互联网...
- 常小兵:将推出具有WiFi功能的iPhone手机_通信...
- IBM启动手机功能简化研发项目 旨在帮助老人_通信...
[错误报告] [推荐] [收藏] [打印] [关闭] [返回顶部]


已有