[英]input text into a comment textarea html/jquery on submit
So Basically I want to make my function on Click submit the select box values to a comment box on a page this just holds it in a textarea that must be copied and pasted to the comment box. 所以,基本上,我想在Click上执行我的功能,将选择框值提交到页面上的注释框,这会将其保存在必须复制并粘贴到注释框的文本区域中。
<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>
This is the html code of the Comment textarea i want to insert into. 这是我要插入的Comment文本区域的html代码。
<textarea class="input-full" name="commentText" maxlength="40000" placeholder="Leave a comment…">Text Goes Here</textarea>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.