JS高手们请进来,javascript添加标签的问题!

来源:百度知道 编辑:UC知道 时间:2024/07/07 21:26:38
在网上搜到一个小程序,很好用,但美中不足的是不能限制添加的数量,哪位高手给改一下,

目的:快速添加标签,但是只能添加5个标签!

高手帮帮忙!

程序:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; cha rset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
a.blue:link,a.blue:visited{
font-size: 12px;
color: #69c;
text-decoration: none;
}
a.blue:hover{
background: #69c;
color: #fff;
}
</style>
<script type="text/javascript">

代码如下,只能输入五个,请运行检测
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; cha rset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
a.blue:link,a.blue:visited{
font-size: 12px;
color: #69c;
text-decoration: none;
}
a.blue:hover{
background: #69c;
color: #fff;
}
</style>
<script type="text/javascript">
var num = 0;
function fInsert(a,b){
oInput = document.getElementById(a)