嗯!求大神解答,关于jQuery的使用!困扰几个点了!
我现在正在做一个小项目,学校的那种,不是很正规。在使用jQuery进行前台设计的时候遇到了一些问题。代码:
[解决办法]
<textarea>文字放在这</textarea>
[解决办法]
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<p title="A detail introduction about your conference" id="introduction">
A smart thing can be endowed with different levels of intelligence, and may be context-aware, active, interactive, reactive</p>
<script>
$(function () {
$('#introduction').click(function () {
$("#introduction").click(function (e) {
if (e.target.tagName == 'TEXTAREA') return;
var text = $(this).text();
$(this).html("<textarea id='txtIntroduction'>" + text + "</textarea>");
$("#txtIntroduction").css("width", "550px").css("height", "300px").blur(function () {
$('#introduction').html(this.value);
})
});
});
});
</script>