Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

135
Visualizações
vuejs get text values across browser

i have text box if i type something it's showing text value based on it's id, my code is working when i run it on laptop http://localhost:8080/

if i open same website my on phone http://xxx.xxx.x.xxx:8080/ it's showing same page.

when i type text box id on phone and i try to view value which is on laptop, it's not showing that value.

enter image description here

template:

<input id="1" type="text" placeholder="i am id1, show my value" />

  <input id="2" type="text" placeholder="i am id2, show my value" />

  <input v-model="searchidinput" type="text" placeholder="which ids data you want, 1 or 2 " />

  <button @click="getvalue">RECEIVE</button>

  <div>show value of id {{ searchid ? searchid : "<none>" }} here: 
{{ value ? value : "none selected"}}
    
  </div>
</template>

VUEJS:

    <script>
import { defineComponent,ref } from 'vue'
export default defineComponent({
  setup() {
     const value = ref("");

    const searchid = ref("");
    const searchidinput = ref("");

function getvalue() {
this.value=null
      this.searchid = this.searchidinput
      const el = document.getElementById(this.searchid);
      if (el) {
        this.value = el.value
        console.log(value);
      }
    }

    return {
      value,
      searchid,
      getvalue,
      searchidinput,
    };
}
})
</script>

How can i transfer text values without database across browser on same domain/website.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You will either need a backend server to sync the data from a hub, or will need to use WebRTC technology for peer-to-peer interaction.

Here is a link to a project that should fit the bill.

https://docs.yjs.dev/

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda