<!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; charset=gb2312" />
<title>cccccc
</title>
<style type="text/css">
ul li{
cursor:pointer;
}
</style>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
function ce(){
var k=$("ul>li");
k[0].text("gaile");//想在这里修改ul里面第一个li的text值
}
</script>
</head>
<body>
<ul>
<li>11111111</li>
<li>22222222</li>
<li>33333333</li>
</ul>
<input type="button" value="点我" onclick="ce();"/>
</body>
</html>
高手帮忙解决下。貌似这个能行但是不行有没有别的方法。
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>cccccc
</title>
<style type="text/css">
ul li{
cursor:pointer;
}
</style>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
function ce(){
var k=$("ul>li");
k[0].text("gaile");//想在这里修改ul里面第一个li的text值
}
</script>
</head>
<body>
<ul>
<li>11111111</li>
<li>22222222</li>
<li>33333333</li>
</ul>
<input type="button" value="点我" onclick="ce();"/>
</body>
</html>
高手帮忙解决下。貌似这个能行但是不行有没有别的方法。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货