所以基本上我想在我的功能上点击将选择框值提交到页面上的评论框,这只是将其保存在必须复制并粘贴到评论框的文本区域中。
<script type="text/javascript">
$('#myDiv').click(function(){
('#select select').appendTo('myDiv');
('#select').css('display','block');
('#select select').attr('selected').html().clone().sppendTo('textarea');
});
("#ABCA").click(function(){
var text1 = $('#equipment option:selected').val();
var text2 = $('#locid option:selected').val();
var text3 = $('#areaid option:selected').val();
var text4 = $('#status option:selected').val();
var text5 = $('#employee option:selected').val();
var text6 = $('#Room option:selected').val();
('#myDiv textarea').html("The " + text1 + " is " + text4+" at " + text2+" on the/in " + text3 + text6 +" Submitted BY: " + text5 + " Any Additional Comments or concerns may be posted here: ");
});
</script>
这是我要插入的评论textarea的html代码。
<textarea class="input-full" name="commentText" maxlength="40000" placeholder="Leave a comment…">Text Goes Here</textarea>