Change input value doesnt work in inputs.html

In index.html i do this

Input type=“text” id=“name” placeholder=“your name”

document.getElementById(“name”).value = “myname”;

Its change


I have page route to /inputs/ and i do that script it doesnt work…

I do the same in kitchen-sink in inputs.html but its change nothing… how can i change the input value else page index.html pls help me out this…

In the same way, make sure you call your script within pageInit event for related page, and use more specific selector like

$('.page[data-name="some-page"] input[type="name"]').val('new value');

Im still confuse… i try like this but not work

Can you give example more spesific?. I try that on kitchen-sink in www/pages/inputs.html no luck

And i try put script in app.js still no luck

I knew i can do value=“myval” but i want to show localstorage as dinamic value

Please help me sir

This is something wrong, there is no .page[data-name="some-page"] element which supposed to be:

<div class="page" data-name="some-page">

How did you try it?

Looks like you need to start from basics to understand how things work in F7: