how show dynamic text into div

how show dynamic text into div

Hi I have tried this to write dynamic value into a div, I have tried both way but it is not showing "hello world" output

    $(document).ready(function(e) {
            document.getElementsByClassName("output").innerHTML='hello world';
            $('.output').innerHTML='hello world';
    });