-1

この div に次のメッセージが含まれている場合、ページをリダイレクトできるようにしたいと思います。

<DIV class=FinalMessageDialog id=DialogFinalMessage><DIV>
The form has been closed.
</DIV></DIV>

事前に感謝します。何か違いがある場合は、SharePoint Web パーツでこれを完了しようとしています。このコードは既に試しましたが、機能しません。

$(document).ready(function(){
if($('#DialogFinalMessage').children().length>0)
{
 window.location.href = "<Desired destination page URL>";
}
 });
4

2 に答える 2

2

このようなものが動作するはずです:

if ($('#DialogFinalMessage>div').text() === 'The form has been closed.') {
    window.location.href = "<Desired destination page URL>";
}
于 2013-08-02T09:39:22.380 に答える