Полноэкранное фоновое изображение не прокручивается с содержимым html5 phonegap

У вас есть несколько вариантов:

  1. Сохраните его в сеансе.
    // Memorise any passed in user.
    String username = request.getParameter("username");
    if (username != null && username.length() > 0) {
      session.setAttribute("username", username);
    }
    
  2. Сохраните его как скрытое поле в форме.
    
    
  3. Храните его в файле cookie.
    username = getCookie(userCookieName);
    
    // Get from cookie.
    function getCookie(name) {
      if (document.cookie) {
        index = document.cookie.indexOf(name);
        if (index !== -1) {
          f = (document.cookie.indexOf("=", index) + 1);
          t = document.cookie.indexOf(";", index);
          if (t === -1) {
            t = document.cookie.length;
          }
          return(document.cookie.substring(f, t));
        }
      }
      return ("");
    }
    
  4. Удерживайте его на стороне клиента в sessionStorage. Подробнее см. здесь .
    sessionStorage.setItem("username", "...");
    
  5. Не совсем другой вариант, кроме механизма - передать его в URL:
    .... onclick="window.location='details.jsp?username=...'
    

0
задан Nishanthi Grashia 16 May 2018 в 04:53
поделиться