有没有办法选择兄弟节点?(Is there a way to select sibling nodes?)
出于某些性能原因,我试图找到一种方法来选择所选节点的兄弟节点。 例如,
<div id="outer"> <div id="inner1"> </div> <div id="inner2"> </div> <div id="inner3"> </div> <div id="inner4"> </div> </div>
如果我选择了inner1节点,有没有办法让我访问它的兄弟姐妹,inner2-4节点?
For some performance reasons, I am trying to find a way to select only sibling nodes of the selected node. For example,
<div id="outer"> <div id="inner1"> </div> <div id="inner2"> </div> <div id="inner3"> </div> <div id="inner4"> </div> </div>
If I selected inner1 node, is there a way for me to access its siblings,
inner2-4
nodes?
原文:https://stackoverflow.com/questions/842336
最满意答案
它看起来像是将左窗格(使用源代码)和右窗格之间的垂直分隔符完全拖动到左侧,因此现在只有右窗格保持可见。
将鼠标移动到调试器窗口的左边缘并将分隔符拖回到中间。
It looks like you dragged the vertical separator between the left pane (with the source code) and the right pane completely to the left, so only the right pane remains visible now.
Move your mouse to the left margin of the debugger window and drag the separator back to the middle.
相关问答
更多-
它看起来像是将左窗格(使用源代码)和右窗格之间的垂直分隔符完全拖动到左侧,因此现在只有右窗格保持可见。 将鼠标移动到调试器窗口的左边缘并将分隔符拖回到中间。 It looks like you dragged the vertical separator between the left pane (with the source code) and the right pane completely to the left, so only the right pane remains visible n ...
-
更新:远程调试 以前,控制台日志记录是在Android上调试JavaScript的最佳选择。 现在,通过Chrome for Android远程调试,我们可以利用Android上的Chrome for Desktop Developer Tools的所有优点。 查看https://developers.google.com/chrome-developer-tools/docs/remote-debugging了解更多信息。 更新:JavaScript控制台 您还可以在URL栏中导航到about:debug ...
-
调试一个崩溃的IE11(Debug a crashing IE11)[2022-12-16]
我找到的“解决方案”是升级到负责崩溃的JavaScript库(D3,d3js.org)。 崩溃只是消失了 但是,IE11仍然吸引大量时间 The "solution" I found was to upgrade to the Javascript library responsible for the crash (D3, d3js.org). The crash simply dissappeared But yes, IE11 still sucks big time -
转到Internet选项 - >高级。 取消选中禁用脚本调试,禁用脚本调试(其他) Must be a problem with my IE11 install - I downloaded an IE11 vm from modern.ie and it works fine there. (setup information here for any curious https://superuser.com/questions/248569/virtual-pc-cant-access-localho ...
-
在iPad上调试Javascript(Debugging Javascript on iPad)[2023-04-01]
你看过webkit远程调试协议吗? 似乎他们知道人们想要一个调试器为他们的iPad,但仍然没有真正的世界原生iPad远程调试器可用在那里。 但不要失望,现在有一个叫做weinre的工具,做一个webkit的人愿意做的事情, 更新: 通过发布Google Chrome for Android手机,远程调试和平板电脑调试移动网络应用程序已经不再是痛苦了。 您将需要一个昂贵的Google Galaxy Nexus手机与ICS来做到这一点。 但未来光明! 看看这里的视频演示: weinre是Web Inspecto ... -
我今天发现我们现在可以调试Javascript使用IE 8中的开发人员工具栏插件。 单击选项卡右侧工具栏上的“工具”。 选择开发工具 。 开启工具对话框应该打开。 单击对话框中的脚本选项卡。 单击开始调试按钮。 与专业浏览器中的调试器类似,您可以使用watch,breakpoint,查看调用堆栈等。 您也可以使用语句debugger; 在你的JavaScript代码中设置一个断点。 I discovered today that we can now debug Javascript With the de ...
-
为什么在JavaScript中“1”+ +“1”=“11”,但“1” - - “1”= 2(Why is “1” + + “1” = “11” but “1” - - “1” = 2 in JavaScript)[2021-11-21]
-运算符对字符串没有意义,所以它将该值转换为一个Number 。 the - operator has no meanings on strings, so it converts the value to a Number. -
您可以直接访问这样的属性: currentFrame.myProperty 设置currentFrame [ “myProperty的”] You can directly access in property like this: currentFrame.myProperty currentFrame["myProperty"]
-
不幸的是,没有简单的方法。 您需要使用线点创建顶点缓冲区。 如果要绘制多条线,请将所有顶点放在一个缓冲区中以优化性能。 由于在DirectX 10中删除了FFP,因此需要一个简单的着色器。 顶点着色器可能只是使用视图和投影变换转换顶点,并且像素着色器返回恒定颜色(根据您的需要)。 然后,您将使用适当的拓扑(行列表)绘制顶点缓冲区。 没有简单方法(如Jesus Ramos的回答或OpenGL的glBegin(GL_LINES) )的原因是它们无法有效实现。 始终需要将更多数据传输到GPU而不是需要。 这就是程 ...
-
如果您在任何带有NetBeans连接器的浏览器中运行HTML5项目,它总是在调试和运行的同时(检查工具栏中的浏览器切换器)。 所以一旦你运行项目/文件,如果应该点击一些断点,它将是。 因此,HTML5项目未启用调试操作,因为它与“运行”操作相同。 基本上它意味着您可以使用NetBeans Connector,IDE中的嵌入式浏览器,Android上的Chrome,iOS上的Safari来调试Chrome中的JS ... HTML5 project is always debugging and runnin ...