您好,欢迎访问一九零五行业门户网

浅谈JavaScript中anchor()方法的用法

本篇文章和大家一起了解一下javascript中anchor()的使用方法。有一定的参考价值,有需要的朋友可以参考一下,希望对大家有所帮助。
定义和用法:
anchor() 方法用于创建 html 锚。
该方法返回加了 3499910bf9dac5ae3c52d5ede7383485 标签的字符串, 如下所示:
<a name="anchorname">string</a>
语法:
string.anchor(name)
参数 : 描述:
name required. the name of the anchor
浏览器支持:
代码演示如下:
<!doctype html><html><head><meta charset="utf-8"></head><body><script>var txt="chapter 10";txt.anchor("chap10");alert(txt.anchor("chap10"));</script></body></html>
运行结果如下:
推荐学习:《php视频教程》
其它类似信息

推荐信息