Show with an example how to fill in the values of the following tags with JS or jQuery:
<title></title> <meta name="description" content="" /> <meta name="keywords" content="" /> Show with an example how to fill in the values of the following tags with JS or jQuery:
<title></title> <meta name="description" content="" /> <meta name="keywords" content="" /> <script type="text/javascript"> $(document).ready(function() { document.title = 'Ваш title страницы'; }); </script> Short
$(document).prop('title', 'test'); For description:
document.querySelector('meta[name="description"]').setAttribute("content", _desc); There are some doubts about the indexing of the whole business by various search engines. If your page is overloaded in some way, you can use this method for everything else.
Source: https://ru.stackoverflow.com/questions/654555/
All Articles