I have a HTML site and have to replace a string in it.
The code looks like this:
<div class="field field_text field_name_manufacturer_key_number field_value_50-000">
<div class="label">
Herstellerschlüsselnummer
</div>
<div class="label">
50.000
</div>
</div>
I want to only change the string above "Herstellerschlüsselnummer" and the rest have to be untouched
With JavaScript looks like this but it doesn't work and I don't know why
document.getElementsByClassName("field_name_manufacturer_key_number")["0"].innerHTML.replace('Herstellerschlüsselnummer','inkl. Kilometer');
Can someone tell me how do I can manage this? and no, I cant change the HTML or the fields in MYSQL or PHP :) etc.