I wish to copy contents to a clipboard in this format
LAbel : input textbox value
but the jquery which i found seems to give this format
Label
text
label
text
Pls someone give a appropriate way to sought out this.
#html code along with jquery .
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CopyClip.aspx.cs" Inherits="CopyClip.CopyClip" %>
input[type=text], select {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
textarea, select {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
input[type=submit] {
width: 100%;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type=submit]:hover {
background-color: #45a049;
}
div {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
}
$(document).ready(function () {
$("#copyclick").click(function () {
var id = $(this).attr('id');
var el = document.getElementById('div1');
var range = document.createRange();
range.selectNodeContents(el);
var sel = window.getSelection();
sel.removeAllRanges();
sel.addRange(range);
document.execCommand('copy');
})
})
sangeetha kPosted Feb 18, 2019, 6:25 AM
sangeetha kPosted Feb 18, 2019, 3:51 AM
Faisal PathanPosted Feb 18, 2019, 3:29 AM
sangeetha kPosted Feb 18, 2019, 3:26 AM
Last Name:k
Country:australia
Textarea:Hello World
MultilineArea:dffdfffdfsfdffdffffdsdfsdfffdffdff
sangeetha kPosted Feb 14, 2019, 2:56 AM
First Name:sangeetha
Last Name:k
Country:australia
Textarea:Hello World
MultilineArea:dffdfffdfsfdffdffffdsdfsdfffdffdff
Faisal PathanPosted Feb 13, 2019, 5:35 AM
Faisal PathanPosted Feb 13, 2019, 5:31 AM
sangeetha kPosted Feb 13, 2019, 5:28 AM
sangeetha kPosted Feb 13, 2019, 5:10 AM
Faisal PathanPosted Feb 13, 2019, 3:25 AM