Cookie可以儲存和擷取相同網域上各頁面的資訊。使用 Util.cookieRead()
方法可從 Cookie 擷取值。
您可以透過在資料元素中設定值來讀取 Cookie。
Cookie 值會儲存在資料元素中。然後,您就可以參考規則中的資料元素,以指派所需的變數。
呼叫 s.Util.cookieRead()
方法以讀取所需的 Cookie 值。其唯一引數是必要的字串。此方法會傳回包含 Cookie 值的字串。如果 Cookie 不存在,則會傳回空字串。
// Reads the value set in the cookie named 'example' and assigns the value to eVar1
s.eVar1 = s.Util.cookieRead("example");