繁体   English   中英

将来自MySQL DB的文本添加到ColorBox内的表单中

[英]Adding text from MySQL DB into a form inside a ColorBox

我在将MySQL数据库中的文本添加到ColorBox内的表单(文本字段)时遇到麻烦。

我现在有这个脚本:

<a href="#" class="bttn sgreen quote1">Quote</a>

    var postQuote[<?php echo 4id; ?>]=<?php echo $forum->bb_parse($forumPost['post_text']); ?>;
     $(document).ready(function(){
         $(".replyBox").colorbox({inline:true, top: 100, overlayClose:false, width:"35%",href:"#addReply"});
     });

和ColorBox:

<div style="display:none;">
    <div id="addReply" style='padding:10px; background:#fff;'>
        <form method="post" action="#" class="mainForm">
            <label>Your Reply:</label><br /><br />
            <textarea rows="10" style="height:320px;width:400px" cols="20" id="bb" name="text"></textarea>
            <br />
            <div style="text-align:center;">
            <button type="submit" class="bttn sgreen" >Post Reply</button>
            </div>                                 
        </form>
    </div>
</div>

当我按引号时,如何在文本字段中添加“ var postQuote”并打开ColorBox?

$(document).ready(function(){
$("#bb").val(postQuote);
   $(".replyBox").colorbox({inline:true, top: 100, overlayClose:false,     width:"35%",href:"#addReply"});
});

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM