<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-1.3.1.js" type="text/javascript">
$("#test").click(function(){alert("您点击了文字");});
</script>
</head>
<body>
<p id="test">你好</p>
</body>
</html>
我点你好俩字啥怎么啥反应都没有呢
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript" src="jquery-1.3.1.js" type="text/javascript">
$("#test").click(function(){alert("您点击了文字");});
</script>
</head>
<body>
<p id="test">你好</p>
</body>
</html>
我点你好俩字啥怎么啥反应都没有呢
解决方案 »
- mousedown和mouseover不能同时执行吗?
- 如何使用js动态创建asp控件?
- 请问各位大大关于js薪资水平的问题
- ★★★100分★★★ 我用createRange()的pasteHTML方法插入"<time><input type='text'></input></time>"但是实际的代码里变成了"<INPUT></
- 用JS记录登录人数的代码怎么写?急,求帮助.
- 简单问题(50分)!动态生成的层在不同分辨率中定位的问题!
- javascript中的数组
- 保存到发件箱的代码如何写?急
- java中字符串数组,转化为javascript数组,jsp页面显示为乱码,代码如下:
- jquery mouseenter事件中使用hide方法的问题
- 求助一个匹配指定字符集之外字符的正则,谢谢,这里高手多
- 网页游戏都是用什么做的?
$("#test").click(function(){alert("您点击了文字");});
</script>改成
<script language="javascript" src="jquery-1.3.1.js" type="text/javascript"></script>
<script language="javascript">
$("#test").click(function(){alert("您点击了文字");});
</script>不能既加载src又写代码
$("#test").click(function(){alert("您点击了文字");});
});
要在dom加载完执行
<script type="text/javascript">
$("#test").click(function(){alert("您点击了文字");});
</script>
<script type="text/javascript">
$(document).ready(function(){
$("#test").click(function(){alert("您点击了文字");});
});
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script src="jquery-1.3.1.js" type="text/javascript"></script>
<script type="text/javascript">
$("#test").click(function(){alert("您点击了文字");});
</script>
</head>
<body>
<p id="test">你好</p>
</body>
</html>
还是不对呀
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script src="jquery-1.3.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$("#test").click(function(){alert("您点击了文字");});
});
</script>
</head>
<body>
<p id="test">你好</p>
</body>
</html>