dthmllinktest.htm

来自「Windows Web脚本开发指南/(美) Dan Heflin, Todd N」· HTM 代码 · 共 24 行

HTM
24
字号
<html>
<script language="JavaScript">
function switchLinks(text, url){
debugger;
   objLink.setLink(document.all.linkitem.innerText, document.all.linkitem.href);
   document.all.linkitem.innerText = text;
   document.all.linkitem.href = url;
}
function clickedLinkObject(){
    alert("Click Event for the component in the primary document");
}
</script>
<body>
<p>
Below is the primary document's link:<br>
<a id="linkitem" href="http://www.microsoft.com">Microsoft's Web Site</a>
</p>
<div style="behavior:url('dhtmllink.htc')" id="objLink" onclick="clickedLinkObject()"></div><br>
<input type=button value="Switch Links" onclick="switchLinks(objLink.text, objLink.URL)">

</body>

</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?