首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

嗯!求大神解答,关于jQuery的使用!困扰几个点了!该如何解决

2013-12-04 
嗯!求大神解答,关于jQuery的使用!困扰几个点了!我现在正在做一个小项目,学校的那种,不是很正规。在使用jQue

嗯!求大神解答,关于jQuery的使用!困扰几个点了!
我现在正在做一个小项目,学校的那种,不是很正规。在使用jQuery进行前台设计的时候遇到了一些问题。代码:

                                                  javascript                    jQuery                    WEB                                              
[解决办法]
<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>

热点排行