日期:2014-05-16 浏览次数:20475 次
$(document).ready(function () {
$("#introduction").click(function () {
var text = $(this).text();
$(this).html("<textarea value'"+ text + "' id='txtIntroduction'></textarea>");
$("#txtIntroduction").css("width", "550px").css("height", "300px")
});
});
<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 () {