JScript方法-link方法

<script type="text/javascript"> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<script type="text/javascript"> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
把一个有 href 属性的 html 锚点放置在 string 对象中的文本两端。

strvariable. link( linkstring)
"string literal". link( linkstring)

linkstring 参数是想要放置在 html 锚点的 href 属性中的文本。

说明
调用 link 方法来创建 string 对象外部的超链接。下面就是该 方法如何实现这种功能的一个例子:

var strvariable = "this is a hyper link";
strvariable = strvariable. link("http://www.microsoft.com");
最后一条语句执行完后,strvariable 的值是:

<a href="http://www.microsoft.com">this is a hyper link</a>
不检查该标记是否已经被应用于该字符串了。

要求
版本 1

< <script type="text/javascript"> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<script type="text/javascript"> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值