当前位置:首页> 微信 > html 双引号 html output 注意事项

html 双引号 html output 注意事项

2022-06-17 08:52:03 来源: 网络   编辑: 佚名   浏览(634)人   
0

html 双引号 html output 注意事项

这里列出了您在使用html 双引号 html output 时应该尽量避免使用的技术。

Internet Explorer -html 双引号 html output 数据岛

它是什么?html 双引号 html output 数据岛是嵌入到 html 双引号 页面中的html 双引号 html output 数据。

为什么要避免使用它?html 双引号 html output 数据岛只在 Internet Explorer 浏览器中有效。

用什么代替它?您应当在 html 双引号 中使用 htmldocumentScript html 双引号 html output DOM 来解析并显示html 双引号 html output

如需更多有关 htmldocumentScript html 双引号 html output DOM 的信息,请访问我们的html 双引号。

html 双引号 html output 数据岛实例

本例使用html 双引号 html output 文档 "cd_catalog.html 双引号 html output"

html 双引号 html output 文档绑定到 html 双引号 文档中的一个 <html 双引号 html output> 标签。id 属性定义数据岛的标识符,而 src 属性指向html 双引号 html output 文件:

实例

本实例只适用于 IE 浏览器

<html 双引号>

<body>

<html 双引号 html output id="cdcat" src="cd_catalog.html 双引号 html output"></html 双引号 html output>

<table border="1" datasrc="#cdcat">

<tr>

<td><span datafld="ARTIST"></span></td>

<td><span datafld="TITLE"></span></td>

</tr>

</table>

</body>

</html 双引号>

尝试一下 »

<table> 标签的 datasrc 属性把 html 双引号 表格绑定到html 双引号 html output 数据岛。

<span> 标签允许 datafld 属性引用要显示的html 双引号 html output 元素。在这个实例中,要引用的是 "ARTIST" "TITLE"。当读取html 双引号 html output 时,会为每个 <CD> 元素创建相应的表格行。

Internet Explorer - 行为

它是什么?Internet Explorer 5 引入了行为。行为是通过使用 CSS 样式向html 双引号 html output (或 html 双引号 )元素添加行为的一种方法。

为什么要避免使用它?只有 Internet Explorer 支持 behavior 属性。

使用什么代替它?使用 htmldocumentScript html 双引号 html output DOM(或 html 双引号 DOM)来代替它。

实例 1 - 鼠标悬停突出

下面的 html 双引号 文件中的 <htmlpurifier> 元素为 <h1> 元素定义了一个行为:

<html 双引号>

<head>

<htmlpurifier type="text/css">

h1 { behavior: url(behave.htc) }

</htmlpurifier>

</head>

<h1>Mouse over me!!!</h1>

</body>

</html 双引号>

下面显示的是html 双引号 html output 文档 "behave.htc"(该文件包含了一段 htmldocumentScript 和针对元素的事件句柄):

<attach for="element" event="onmouseover" handler="hig_lite" />

<attach for="element" event="onmouseout" handler="low_lite" />

<script>

function hig_lite()

{

element.htmlpurifier.color='red';

}

 

function low_lite()

{

element.htmlpurifier.color='blue';

}

</script>

尝试一下 »

实例 2 - 打字机模拟

下面的 html 双引号 文件中的 <htmlpurifier> 元素为 id "typing" 的元素定义了一个行为:

 

<html 双引号>

<head>

<htmlpurifier type="text/css">

#typing

{

behavior:url(typing.htc);

font-family:'courier new';

}

</htmlpurifier>

</head>

<body>

<span id="typing" speed="100">IE5 introduced Dhtml 双引号 behaviors.

Behaviors are a way to add Dhtml 双引号 functionality to html 双引号 elements

with the ease of CSS.<br /><br />How do behaviors work?<br />

By usinghtml 双引号 html output we can link behaviors to any element in a web page

and manipulate that element.</p>v </span>

</body>

</html 双引号>

下面显示的是html 双引号 html output 文档 "typing.htc"

<attach for="window" event="onload" handler="beginTyping" />

<method name="type" />

<script>

var i,text1,text2,textLength,t;

function beginTyping()

{

i=0;

text1=element.innerText;

textLength=text1.length;

element.innerText="";

text2="";

t=window.setInterval(element.id+".type()",speed);

}

function type()

{

text2=text2+text1.substring(i,i+1);

element.innerText=text2;

i=i+1;

if (i==textLength)

{

clearInterval(t);

}

}

</script>

【版权与免责声明】如发现内容存在版权问题,烦请提供相关信息发邮件至 1439028666@qq.com ,我们将及时沟通进行删除处理。 本站内容除了 98link( http://www.98link.com/ )特别标记的原创外,其它均为网友转载内容,涉及言论、版权与本站无关。