Sun Java System Portal Server Secure Remote Access 7.2 管理指南

DJS 參數範例

假設此網頁的基準 URL 是:

http://abc.sesta.com/page.html

網頁內容

<script>
menu.addItem(new NavBarMenuItem("All Available Information","JavaScript:top.location=\qhttp://abc.sesta.com\q"));
</script>

規則

<Function name="DJS" name="NavBarMenuItem" paramPatterns=",y"/>
<Variable name="URL">top.location</Variable>

輸出

<script>
menu.addItem(new NavBarMenuItem("All Available Information",
"JavaScript:top.location=\qgateway-URL/
http://abc.sesta.com\q"));
</script>

描述

第一個規則指出 NavBarMenuItem 函數中的第二個包含 JavaScript 的參數需要重新寫入。在 JavaScript 中,top.location 變數亦需重新寫入。將使用第二個規則來重新寫入此變數。