DOM和Javascript [英] DOM and Javascript

查看:53
本文介绍了DOM和Javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我允许用户通过上下移动行来重新配置表中一组行的位置。通过交换DOM中的节点来完成更改。

I let a user reconfigure the location of a set of rows in a table by giving them ability to move them up and down. The changes are done by swapping nodes in the DOM.

在用户移动了行之后,当我执行视图源时,我看到的HTML处于原始状态(在用户进行任何更改之前)。

After the user has moved rows around, when I do a view source, I see the HTML in the original state (before the user made any changes).

有人可以解释为什么吗?我的理解是,当我们执行任何DOM操作时,底层HTML也会随之更改。

Can someone explain why that is? My understanding was when we do any DOM operations, the underlying HTML will be changed as well.

编辑:这是在服务器端,当尝试执行以下操作时:获得用户更改后的状态,我将能够获得所需的信息?我正在使用C#/ ASP.NET。

推荐答案

查看源代码时,您正在查看的是浏览器最初下载的内容。要查看当前状态,请使用 Firebug 或Firefox或 DebugBar for IE

When you view source, you're viewing the content that the browser downloaded initially. To see the current state, use a plugin like Firebug for Firefox or DebugBar for IE

这篇关于DOM和Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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