두 개의 HTML 페이지 firstpage.html과 secondpage.html이 있습니다.자바 스크립트에서 데이터를 하나씩 전달
<!DOCTYPE html>
<html>
<head>
<title>Form Filling</title>
</head>
<body>
<form action="secondpage.html" method="GET">
Enter Serial Number: <input type="number" name="serialNumber" />
<input type="submit" value="Submit" />
</form>
</body>
</html>
firstpage 데이터 secondpage.html로 전송된다 firstpage.html에서, 형상 - firstpage.html있다. 나는 표시하고 secondpage.html- secondpage.html에서 양식 데이터의 serialNumber를 사용하려면 : 그래서 secondpage.html하는 그래서 지금은 firstpage.html에서의 serialNumber 변수를 전달할 수 있습니다
<!DOCTYPE html>
<html>
<head>
<title>Display</title>
</head>
<body>
<form name="selva" action="thirdpage.html">
<input type="hidden" name="kumar">
</form>
<script type="text/javascript">
var locate=window.location;
document.selva.kumar.value=locate;
var text=document.selva.kumar.value;
function pass(str)
{
point=str.lastIndexOf('=');
return(str.substring(point+1,str.length));
}
document.write("Serial Number" + pass(text));
</script>
</body>
</html>
을 그 secondpage에서 위의 코드 .html 중에서 시리얼 nuimber을 보여줍니다, 나는 thirdpage- thirdpage.html에 동일 일련 번호를 원하는 :
<!DOCTYPE html>
<html>
<head>
<title>Repeating</title>
</head>
<body>
<form method="link">
Enter Serial Number2: <input type="number" name="burns" />
<input type="submit" value="Submit" />
</form>
</body>
</html>
방법 모든 페이지에서 데이터를 인쇄 알려주세요?
로컬 저장 용량을 사용해 보십니까? – prasanth
아니요, 로컬 저장소 사용 방법을 말할 수 있습니까 –
[localstorage의 기본 및 사용법 참조] (http://www.w3schools.com/html/html5_webstorage.asp) – prasanth