JavaScript中的anchor()方法使用详解

网络编程 发布日期:2024/10/6 浏览次数:1

正在浏览:JavaScript中的anchor()方法使用详解

 此方法创建一个用作超文本目标的HTML锚。
语法

string.anchor( anchorname )


下面是参数的详细信息:

  •     anchorname: 定义了锚的名称

返回值:

  •     返回其锚标记的字符串

例子:

<html>
<head>
<title>JavaScript String anchor() Method</title>
</head>
<body>
<script type="text/javascript">

var str = new String("Hello world");

alert(str.anchor( "myanchor" ));

</script>
</body>
</html>

这将产生以下结果:

<a name="myanchor">Hello world</a>

Windows上运行安卓你用过了吗
在去年的5月23日,借助Intel Bridge Technology以及Intel Celadon两项技术的驱动,Intel为PC用户带来了Android On Windows(AOW)平台,并携手国内软件公司腾讯共同推出了腾讯应用宝电脑版,将Windows与安卓两大生态进行了融合,PC的使用体验随即被带入到了一个全新的阶段。