Динамическая веб-ширина части SharePoint и высота

во-первых, дайте отделению идентификатор. Затем вызовите функцию appendClass:

<script language="javascript">
  function appendClass(elementId, classToAppend){
    var oldClass = document.getElementById(elementId).getAttribute("class");
    if (oldClass.indexOf(classToAdd) == -1)
    {
      document.getElementById(elementId).setAttribute("class", classToAppend);
    }
}
</script>
6
задан 18 August 2009 в 15:53
поделиться

1 ответ

Доступна веб-часть, которая делает это здесь . Вы также можете увидеть решение в сообществах TechNet от «potta vijay kumar» (где я тоже нашел эту веб-часть):

function calcHeight() 
{ 
  //find the height of the internal page 
    var the_height= 
    document.getElementById('contentpage').contentWindow. 
      document.body.scrollHeight; 

  //change the height of the iframe 
  document.getElementById('contentpage').height= 
      the_height; 
}

contentpage - это идентификатор iframe.

A Решение jQuery доступно в EndUserSharePoint.

3
ответ дан 17 December 2019 в 07:07
поделиться
Другие вопросы по тегам:

Похожие вопросы: