viewport remove
특정 조건에 따라 뷰포트를 추가하거나 빼야할 일이 생겼다.
<자바스크립트>
document.getElementsByName('viewport')[0].remove();
document.getElemnetById("form").style.display="none";
</자바스크립트>
* ~viewport~.style.display="none"; 도 해봤는데 화면에 style="display:none" 까지 붙어서 나오더라.
* 내가 해당 jsp에서 viewport를 주석처리 해두고 getElements어쩌고를 해서 null이 나오기도 했음.
* 코드는 다 맞는데 작동을 안하면 해당 스크립트를 jsp하단으로 빼보길
[ meta태그값 컨트롤 ]
Is it possible to use JavaScript to change the meta-tags of the page?
If I put a div in the head and display:none, than use JavaScript to display it, will this work? Edit: I have stuff loaded in AJAX. And as my AJAX changes the "main" portion of the site, I want to
stackoverflow.com
document.querySelector('meta[name="description"]').setAttribute("content", _desc);
$( 'meta[name="xxx"]' ).attr( 'content' );
[js/javascript] 동적으로 meta tag (opengraph) 설정하기
오픈 그래프 기존의 웹사이트를 소셜네트워크 서비스와 연동하여 사업자와 고객들과의 관계를 강화하고 마케팅 플랫폼으로 활용하는 기법. 신규고객 확보나 차별화된 사용자경험(UX)을 고객에
webpaper.tistory.com
$("meta[property='og\\:title']").attr("content", '타이틀넣기' );
$("meta[property='og\\:url']").attr("content", '주소넣기' );
$("meta[property='og\\:description']").attr("content", '페이지설명넣기' );
$("meta[property='og\\:image']").attr("content", '이미지주소넣기' );
https://code-examples.net/ko/q/121a554
javascript - 추가 - og tag 가져 오기
code-examples.net
<script>
var meta = document.createElement('meta');
meta.setAttribute('http-equiv', 'X-UA-Compatible');
meta.setAttribute('content', 'IE=Edge');
document.getElementsByTagName('head')[0].appendChild(meta);
</script>
http://chongmoa.com/jquery/19849
C.m.A API 이야기(Mokulsha!)
C.m.A 사이트에서 사용하고 있는 메타태그 예제 <meta id="meta_name" name="msapplication-starturl" content="http://chongmoa.com"..
chongmoa.com