मुझे लगता है कि मुझे वह मिला है जो आप पूछ रहे हैं।
<html>
<head>
<title>Print TextArea</title>
<script type="text/javascript">
function printTextArea() {
childWindow = window.open('','childWindow','location=yes, menubar=yes, toolbar=yes');
childWindow.document.open();
childWindow.document.write('<html><head></head><body>');
childWindow.document.write(document.getElementById('targetTextArea').value.replace(/\n/gi,'<br>'));
childWindow.document.write('</body></html>');
childWindow.print();
childWindow.document.close();
childWindow.close();
}
</script>
</head>
<body>
<textarea rows="20" cols="50" id="targetTextArea">
TextArea value...
</textarea>
<input type="button" onclick="printTextArea()" value="Print Text"/>
</body>
</html>
मूल रूप से यह एक और चाइल्ड विंडो खोलने के लिए और उस पर जावास्क्रिप्ट प्रिंट पर अमल ताकि पाठ क्षेत्र और अन्य बातों के मुद्रित नहीं मिलता होगा: इसे आज़मा कर देखें।
धन्यवाद, यह मेरे लिए ठीक काम करता है। – Jayashri
खुशी है कि यह काम करता है :) – intellidiot
बीटीडब्ल्यू, आपके प्रश्न में एक और टैग 'जावास्क्रिप्ट' जोड़ा। – intellidiot