Reset input - database Code

Reset input

Show Code

<button aria-label='Clear' class='invisible_btn btnrst' data-text='Clear' onclick='resetText()' type='reset'><svg height='1em' viewBox='0 0 16 16' width='1em' xmlns='http://www.w3.org/2000/svg'><path d='M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8s8-3.6 8-8s-3.6-8-8-8m4.2 10.8l-1.4 1.4L8 9.4l-2.8 2.8l-1.4-1.4L6.6 8L3.8 5.2l1.4-1.4L8 6.6l2.8-2.8l1.4 1.4L9.4 8z' fill='currentColor'/></svg></button>               

.header-searchbar form:focus-within [type=reset] {
    opacity: 1;
    visibility: visible;
}
.invisible_btn {
    opacity: 0;
    visibility: hidden;
}
.btnrst {
    position: absolute;
    right: 55px;
    top: 10px;
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 26px;
    height: 26px;
    appearance: none;
    border: none;
    background: #0000;
    cursor: pointer;
}
.btnrst svg{
    fill:#222
}

<script>
  /*<![CDATA[*/
function resetText() {  document.querySelector('.resetinput').value = ''; }/*]]>*/
</script>
Fitur khusus Admin
Fitur Khusus User