客户端更改未反映在页面中 [英] Client side changes not reflected in page

查看:67
本文介绍了客户端更改未反映在页面中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!


我在表单中有一个隐藏的输入字段,我在某些情况下更改

客户端使用javascript,

但是当我使用查看源代码时我无法看到页面上反映出的这些变化!


有谁知道我应该怎么做才能让页面知道变化?

(尝试使用enableviewstate = false,true,无论如何,都不起作用)


我希望在页面中反映出更改而不执行

回发或回发!


这可能吗?提前致谢!

Hi everyone!

I have a hidden input field in a form which I change in some occasions on
the client using javascript,
but when I use "view source" I can''t see these changes reflected on the page!

Does anyone know what I should do in order for the page to know the change?
(Tried with enableviewstate=false, true, whatever, didn''t work)

I would like to have the change reflected in the page without doing a
postback or on the postback!

Is this possible? Thanks in advance!

推荐答案

将其粘贴在浏览器地址栏中,您将看到更改:

javascript < b> :document.write("< xmp>" + document.documen tElement.innerHTML +

"< / xmp>");


HTML DOM的动态更新通常不会显示查看源。

Peter

-

网站: http://www.eggheadcafe.com

UnBlog: http://petesbloggerama.blogspot.com

短网址&更多: http://ittyurl.net


patrickdrd写道:
Stick this in the browser addressbar and you''ll see the changes:
javascript:document.write("<xmp>"+document.documen tElement.innerHTML+
"</xmp>");

Dynamic updates to the HTML DOM don''t usually show up with "View Source".
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"patrickdrd" wrote:

大家好!


我有一个隐藏的输入字段,我在某些情况下改变

客户端使用javascript,

但是当我使用view source时我无法看到页面上反映出的这些变化!


有谁知道我应该怎么做才能让页面知道变化?

(尝试使用enableviewstate = false,true,无论如何,都不起作用)


我希望在页面中反映出更改而不执行

回发或回发!


这可能吗?提前致谢!
Hi everyone!

I have a hidden input field in a form which I change in some occasions on
the client using javascript,
but when I use "view source" I can''t see these changes reflected on the page!

Does anyone know what I should do in order for the page to know the change?
(Tried with enableviewstate=false, true, whatever, didn''t work)

I would like to have the change reflected in the page without doing a
postback or on the postback!

Is this possible? Thanks in advance!


查看源显示服务器发送的内容,而不是

页面的当前状态。如果javascript改变了任何东西,它就不会反映在源代码中。


例如这个页面的查看源看起来就像渲染的html:


< html>

< body>

< script>

for(var i = 0; i< 100; ++ i )document.write(''hello''+ i +''< br>'');

< / script>

< / body>

< / html>

- 布鲁斯(sqlwork.com)

patrickdrd写道:
view source shows what the server sent, not the current state of the
page. if javascript changed anything it is not reflected in the source.

for example view source of this page looks nothing like the rendered html:

<html>
<body>
<script>
for(var i=0; i< 100; ++i) document.write(''hello '' + i + ''<br>'');
</script>
</body>
</html>
-- bruce (sqlwork.com)
patrickdrd wrote:

大家好!


我在表单中有一个隐藏的输入字段,我在某些情况下在客户端使用javascript更改



但是当我使用view source时我无法看到页面上反映出的这些变化!


有谁知道我应该怎么做才能让页面知道变化?

(尝试使用enableviewstate = false,true,无论如何,都不起作用)


我希望在页面中反映出更改而不执行

回发或回发!


这可能吗?提前致谢!
Hi everyone!

I have a hidden input field in a form which I change in some occasions on
the client using javascript,
but when I use "view source" I can''t see these changes reflected on the page!

Does anyone know what I should do in order for the page to know the change?
(Tried with enableviewstate=false, true, whatever, didn''t work)

I would like to have the change reflected in the page without doing a
postback or on the postback!

Is this possible? Thanks in advance!


是的,但当页面回发到服务器时,

javascript所做的更改无法识别通过服务器代码,

,而服务器识别通过用户输入所做的更改,

它不知道javascript所做的更改!为什么?


" Peter Bromberg [C#MVP]"写道:
Yes, but when the page is posted back to the server,
the change that javascript made isn''t recognized by the server code,
while the server recognizes changes made through user input,
it doesn''t know changes made by javascript! Why?

"Peter Bromberg [C# MVP]" wrote:

将其粘贴在浏览器地址栏中,您将看到更改:

javascript : document.write("< xmp>" + document.documen tElement.innerHTML +

"< / xmp>");


HTML DOM的动态更新通常不会显示查看来源。

Peter


-

网站: http://www.eggheadcafe.com

UnBlog: http://petesbloggerama.blogspot.com

短网址和更多: http://ittyurl.net


patrickdrd写道:
Stick this in the browser addressbar and you''ll see the changes:
javascript:document.write("<xmp>"+document.documen tElement.innerHTML+
"</xmp>");

Dynamic updates to the HTML DOM don''t usually show up with "View Source".
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"patrickdrd" wrote:

大家好!


我有一个隐藏的输入字段,我在某些情况下改变

客户端使用javascript,

但是当我使用view source时我无法看到页面上反映出的这些变化!


有谁知道我应该怎么做才能让页面知道变化?

(尝试使用enableviewstate = false,true,无论如何,都不起作用)


我希望在页面中反映出更改而不执行

回发或回发!


这可能吗?提前致谢!
Hi everyone!

I have a hidden input field in a form which I change in some occasions on
the client using javascript,
but when I use "view source" I can''t see these changes reflected on the page!

Does anyone know what I should do in order for the page to know the change?
(Tried with enableviewstate=false, true, whatever, didn''t work)

I would like to have the change reflected in the page without doing a
postback or on the postback!

Is this possible? Thanks in advance!


这篇关于客户端更改未反映在页面中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆