时间:2021-07-01 10:21:17 帮助过:2人阅读
<!DOCTYPE html>
<html>
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /><title>
JQuery [data]参数使用说明
</title><link href="css/main.css" type="text/css" rel="stylesheet" />
<script src="jquery-1.8.3.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
var message="把该信息传递给Fn函数";
$(".txt").click({msg:message},function(event){$("#idTip").show().html(event.data.msg);});//设置文本
});
</script>
</head>
<body>
<input class="txt"></div>
<div id="idTip"></div>
</body>
</html>