• 02-11-2022, 18:47:08
    #1
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Şöyle bir kod varmı vardırda bulamadım . Örnek olarak.

    Telefon Numarası : 0555 555 5555 - burda kopyala butonu olcak ve telefon numarasını kopyalıcak
  • 02-11-2022, 18:51:19
    #3
    Bu nedir beynim yandı kod bilgim okadar yok hocam
  • 02-11-2022, 18:51:52
    #4
    Kaynak: Link;

    <!-- The text field -->
    <input type="text" value="0555 555 55 55" id="myInput">
    <!-- The button used to copy the text -->
    <button onclick="myFunction()">Kopyala</button>
        .tooltip {
      position: relative;
      display: inline-block;
    }
    .tooltip .tooltiptext {
      visibility: hidden;
      width: 140px;
      background-color: #555;
      color: #fff;
      text-align: center;
      border-radius: 6px;
      padding: 5px;
      position: absolute;
      z-index: 1;
      bottom: 150%;
      left: 50%;
      margin-left: -75px;
      opacity: 0;
      transition: opacity 0.3s;
    }
    .tooltip .tooltiptext::after {
      content: "";
      position: absolute;
      top: 100%;
      left: 50%;
      margin-left: -5px;
      border-width: 5px;
      border-style: solid;
      border-color: #555 transparent transparent transparent;
    }
    .tooltip:hover .tooltiptext {
      visibility: visible;
      opacity: 1;
    }
    function myFunction() {
      // Get the text field
      var copyText = document.getElementById("myInput");
      // Select the text field
      copyText.select();
      copyText.setSelectionRange(0, 99999); // For mobile devices
       // Copy the text inside the text field
      navigator.clipboard.writeText(copyText.value);
      // Alert the copied text
      alert("Copied the text: " + copyText.value);
    }
  • 02-11-2022, 18:54:23
    #5
    Html içine ekleyin;

      <span id="phone" onClick="copy()">0 555 555 55 55</span>
    sayfanın altına </body> tag öncesi de bunu ekleyin

    <script>
    function copy(){ navigator.clipboard.writeText(document.getElementById("phone").innerText);}
    </script>
  • 02-11-2022, 18:54:45
    #6
    gurkanpx adlı üyeden alıntı: mesajı görüntüle
    Bu nedir beynim yandı kod bilgim okadar yok hocam
    <button onclick="copy('05555555555')">0555 555 55 55</button>
    <script type="text/javascript">
    function copy(text) {
        var input = document.createElement('textarea');
        input.innerHTML = text;
        document.body.appendChild(input);
        input.select();
        var result = document.execCommand('copy');
        document.body.removeChild(input);
        return result;
    }
    </script>
    copy('') tırnak işaretleri içerisine kopyalanacak veriyi ekle
  • 02-11-2022, 19:00:35
    #7
    çok teşekkür ederim
    v4r1able adlı üyeden alıntı: mesajı görüntüle
    <button onclick="copy('05555555555')">0555 555 55 55</button>
    <script type="text/javascript">
    function copy(text) {
        var input = document.createelement('textarea');
        input.innerhtml = text;
        document.body.appendchild(input);
        input.select();
        var result = document.execcommand('copy');
        document.body.removechild(input);
        return result;
    }
    </script>
    copy('') tırnak işaretleri içerisine kopyalanacak veriyi ekle
  • 02-11-2022, 19:39:05
    #8
    Copyalamak yerine direk arama da yaptırabilirsiniz

    <a href="tel://+90533blablaa">Mobil </a>
  • 03-11-2022, 21:04:10
    #9
    Butona Renk verebiliyormuyuz
    v4r1able adlı üyeden alıntı: mesajı görüntüle
    <button onclick="copy('05555555555')">0555 555 55 55</button>
    <script type="text/javascript">
    function copy(text) {
        var input = document.createElement('textarea');
        input.innerHTML = text;
        document.body.appendChild(input);
        input.select();
        var result = document.execCommand('copy');
        document.body.removeChild(input);
        return result;
    }
    </script>
    copy('') tırnak işaretleri içerisine kopyalanacak veriyi ekle