You must Sign In to post a response.
  • Category: JavaScript

    How to copy textbox value to clipboard using JQeury ?


    Are you looking for a way to copy textbox value to clipboard using JQeury ? then read this thread to know how to copy it



    I have to copy the textbox value to the clipboard on the click of button in j query and not want to use any plugin to do this.Please help


    Thank you.
  • #756443
    use following code to copy textbox data to clip board using javscript, you can use same code in JQuery

    <SCRIPT LANGUAGE="JavaScript">

    function ClipBoard()
    {
    holdtext.innerText = copytext.innerText;
    Copied = holdtext.createTextRange();
    Copied.execCommand("Copy");
    }

    </SCRIPT>

    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #756444
    hello prasad ,
    thanku for the reply,i have tried this and it is not working,can you please dpecify what is holdtext and copyt text,is it any class or id of the Dom element.and is Copied a jquery function?

    thanku


  • Sign In to post your comments