Answers for "javascript update meta tag"

2

javascript change meta tag

document.querySelector('meta[name="description"]').setAttribute("content", _desc);
Posted by: Guest on January-16-2020
0

how to use a script to inject a meta attribute in html

document.addEventListener('requireready', function onRequireReady() {
            require(['jquery'], function run($) {
                $(document).ready(function () {
                    $(".className").closest("element").attr("tag", "value");
                });
            });
        });
Posted by: Guest on January-22-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language