SharePoint でポップアップ ページとして開くことができるページがあります。ページがポップアップとして開かれると、いくつかの CSS を変更する必要があります。何が起こっているのかというと、コードはラベル要素を正常に変更できますが、ページを保持し、ページを保持している iFrame 要素の上にあるウィンドウ sharepoint である .ms-dlgTitleText を変更するには、ここで何ができるか教えてください。
編集: クラス ms-dlgTitle を使用して div 内のコンテンツを変更する方法を知りたい
<div class="dialogue>
<div class="ms-dlgTitle">
content
</div>
<div class="dlgframe">
<iframe>
some data
<script src="/_layouts/1033/jQuery.js" type="text/javascript">
</script>
<script type="text/javascript">
$(document).ready(function ()
{if (window.location.search.match("[?&]IsDlg=1"))
{
alert("doc is ready now");
$('<style type="text/css">.ms-dlgTitle{ width: 200px; } #foo{background:black; }</style>').appendTo("head");}});
function t(){ var options = SP.UI.$create_DialogOptions();options.url = "http://sharepointhost:2266";options.height = 300;SP.UI.ModalDialog.showModalDialog(options);
}
</script>
<a class="s" onclick="javascript:t()">k</a> <label title="label1" id="foo">lbl</label>
</iFrame>
</div>