Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

124
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda