how can i change & save by class name

I have a a page like control panel for the index.html page and I want to change the contains from this page to that.

        <div>
            <span id= "item-name" class="item-name">phone 1</span>
            <span id= "item-name" class="item-name">phone 2</span>
        </div>

like here how can I access to phone 1 and change it permanent from that page.

Thank you