[Solved] if statement based on Label tekst [closed]


Well, what is label? Does it have a text property? If you’ve identified the <label> element using a jQuery selector, you can get the text therein with the text() function. Something like this:

<label>This Text</label>

<script type="text/javascript">
    var label = $('label');
    if (label.text() === 'This Text') {
        alert('hi');
    }
</script>

Example here.

3

solved if statement based on Label tekst [closed]