用的是jq1.32
如何弹出样式为a的dom的innerHTML
<!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></title>
<script language="javascript" src="jquery.js"> </script>
<style type="text/css">
.a{
background-color:#0000FF;
}
.b{
font-size:16px;
}
</style>
</head> <body>
<div id = "div" class="a">vvvvvvvvvvvvvv</div>
<script language="javascript">
alert($(".a").innerHTML);
</script>
</body>
</html>
如何弹出样式为a的dom的innerHTML
<!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></title>
<script language="javascript" src="jquery.js"> </script>
<style type="text/css">
.a{
background-color:#0000FF;
}
.b{
font-size:16px;
}
</style>
</head> <body>
<div id = "div" class="a">vvvvvvvvvvvvvv</div>
<script language="javascript">
alert($(".a").innerHTML);
</script>
</body>
</html>
解决方案 »
- 关于继承问题
- |zyciis| 如何在window下调用一个知道名称的对像,谢谢 有代码
- writeln是换行输出吗?
- 大家好,请教一个关于JS内removeattribute方法的问题
- 在QQ聊天窗口里面,输入网址就回显示它的正文摘要,如何实现的
- 在网页做统计图表之类的是用vml还是用dll好?
- 上下滚动图片,但是不能连续的头尾接上,而是显示完了所有图片再从头再来。
- 关于打开窗口的问题(window.open)
- =========== js 可以发送一硬盘上的文件么? ==========
- js中的onload与onclick
- C#里的DateTime 在 js里面如何转换??
- js实现框架
<!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></title>
<script language="javascript" src="jquery.js"> </script>
<style type="text/css">
.a{
background-color:#0000FF;
}
.b{
font-size:16px;
}
</style>
</head> <body>
<div id = "div" class="a">vvvvvvvvvvvvvv</div>
<script language="javascript">
alert($(".a").html());
</script>
</body>
</html>
alert($("#div").innerHTML);
</script>也可以:<script language="javascript">
alert(document.getElementById("div").innerHTML);
</script>
<!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></title>
<script language="javascript" src="jquery.js"> </script>
<style type="text/css">
.a{
background-color:#0000FF;
}
.b{
font-size:16px;
}
</style>
</head> <body>
<div id = "div" class="a">vvvvvvvvvvvvvv</div>
<script language="javascript">
alert($(".a").html());
</script>
</body>
</html>