Method for transmitting values ​​between webpages

xiaoxiao2021-03-06  162

Method for transmitting values ​​between webpages

====== Cited from http://blog.9cbs.net/xam9cbs2/Archive/2004/08/03/598.aspx

How to pass a value from a web page to another web page, usually there is such a few clocks. Http://localhost/test.aspx? Name = [You want to pass the value] b. Use form's Submit ( ) Specify Target C. Cookies d. Session asp.net is also a kind of static global borrowing of the Page class is also a. Flexible but 255 characters limit, and the issue of Chinese may exist on the code (this later and everyone discuss). c. Restrictions on client settings. d. Service is overhead resource, and there are problems such as expired sharing. Anyway, there is excellent advantages, to integrate them. What I want today is another way may not be practical, everyone is watching. :) The code is as follows: set win = window.open ("test.aspx") while win.document.readyState = "load" 'do notning but wait in ("txtname"). Value = " Test "TXTNAME is Test.ASPX if it is more Test.htm effect, you can pass a few hundred k text.

-------------------------------------------------- --------------------

Document.all doesn't seem to apply to browsers other than IE. For new browsers, it is best to use Document.GtelementByid. Not only the element of form, as long as it is a TAG with ID, it can be used. HTML:

JS:

Win.Document.getlementByid ("divTest"). Innerhtml = "abcd";

The landlord can be changed

Win.Document.getlementByid ("txtname"). Value = "test";

-------------------------------------------------- ----------------------

This article is very inspired by me, I have a lot of things, thank you.

转载请注明原文地址:https://www.9cbs.com/read-128407.html

New Post(0)