jQuery按名称选择元素(jQuery selecting elements by name)
我有以下的html:
<td valign="top" align="left"> <input style="width:250px;" name="men_url" type="text" /></td> <td valign="top" align="left"> <select name="men_page"> <option value="">Wybierz stronę</option> <option value="index.php?page=8">O firmie</option> <option value="index.php?page=9">Referencje</option> </select> </td>
和两个相应的jQuery选择器:
$("select[name='men_page']")
和
$("input[name='men_url']")
第一个很好,第二个不会返回。 这里可能有什么问题?
尤其是alert($(“input [name ='men_url'”)。name); 显示“未定义”
I have the following html:
<td valign="top" align="left"> <input style="width:250px;" name="men_url" type="text" /></td> <td valign="top" align="left"> <select name="men_page"> <option value="">Wybierz stronę</option> <option value="index.php?page=8">O firmie</option> <option value="index.php?page=9">Referencje</option> </select> </td>
and two corresponding jQuery selectors:
$("select[name='men_page']")
and
$("input[name='men_url']")
The first one works great, the second one returns nothing. What might be wrong here?
Especially alert($("input[name='men_url'").name); displays "undefined"
原文:https://stackoverflow.com/questions/3128705
最满意答案
应该是
if (shape.next().contains
对象没有contains方法,shape.next()
返回的Shape
对象具有它。在这种情况下,你应该移除shape.next();
因为你将移动到if
的下一个对象或相应地修改整个代码。Should be
if (shape.next().contains
. The Iterator object don't have the contains method, theShape
object returned byshape.next()
has it. In that case you should remove the lineshape.next();
since you'll move to the next object inside theif
or modify the entire code accordingly.
相关问答
更多-
应该是if (shape.next().contains对象没有contains方法, shape.next()返回的Shape对象具有它。在这种情况下,你应该移除shape.next();因为你将移动到if的下一个对象或相应地修改整个代码。 Should be if (shape.next().contains. The Iterator object don't have the contains method, the Shape object returned by shape.next() has ...
-
我刚刚解决了添加此行的依赖关系问题:compile“com.clarifai.clarifai-api2:core:2.2.0” ...在两个文件的依赖关系部分: - build-gradle(core)和 - build-gradle(test): ...和重新加载项目的核心和测试。 I've just solved the dependencies problems adding this line: compile "com.clarifai.clarifai-api2:core:2.2.0" ... ...
-
你确定你下载了可以访问HTML5 / JavaScript的正确版本的IDE吗? 链接到正确版本的图像 我作为测试下载了C ++,并且HTML5 / JavaScript项目选项不可用,但我将大部分插件安装在HTML5类别中,并且在重新加载IDE时出现了JavaScript类别中的大部分插件以及项目类型。 我会建议卸载,然后下载正确版本的IDE或安装HTML5和JS类别插件 。 Are you sure you downloaded the correct edition of the IDE that h ...
-
问题是你在静态方法中使用了非静态方法,这在Java中是不允许的,将所有方法都改为静态方法如: public static void time(... private static void loginActionPerformed(... private static void jrActionPerformed(... private static void uActionPerformed(... private static void machineActionPerformed(... privat ...
-
对于netbeans 8.1,它是IDE插件列表中的一个插件。 它没有经过netbeans 8.2的测试/验证。 我手动下载它( http://plugins.netbeans.org/plugin/63714/autosavemodified )并通过IDE的插件下载部分进行安装。 它适用于Ubuntu 16.04中的我! For netbeans 8.1 was a plugin in IDE's plugins list. It was not tested/verified for netbeans ...
-
Java计算器平方根不适用于NetBeans 8.2 [关闭](Java Calculator square root does not work on NetBeans 8.2 [closed])[2024-03-18]
System.out.printf("Your answer is %.2f, n1"); ^ here is the error 这将抛出MissingFormatArgumentException 。 你的错误是你已经在'格式'字符串中包含了所需的参数。 为了解决这个问题,你需要在'format'字符串后添加参数。 喜欢这个: System.out.printf("Your answer is %.2f", n1); S ... -
工具 - >选项 - >字体和颜色 - >选择一个配置文件(如果您对其进行了更改,则重置),您应该好好去! So, I've found a solution, despite it isn't a perfect solution for this problem. I tried to change the font to Consolas, and it looks 99% normal. Fixed
-
8.2没有官方插件。 测试版正在开发中( https://cwiki.apache.org/confluence/display/NETBEANS/NBPython )。 您可以下载并安装8.1版本( http://plugins.netbeans.org/plugin/61688/python )。 1)解压缩2)启动Netbeans IDE 8.2 3)工具 - >插件 - >下载 - > [添加插件...]打开解压缩的文件4)安装所有插件5)重启IDE 祝您好运,因为您的里程可能非常;-) There ...
-
由于编译成功,您的编译器设置看起来不错。 你可以做什么: Context menu of Project -> Code Assistance Reparse Project 由于NB8.2可用: Clean C/C++ cache and restart IDE 手动 清理 (又名。删除) 缓存并重新启动IDE(您可以在帮助 - >关于 - 在Linux上看到缓存目录,通常是~/.cache/netbeans/
检查IDE日志是否有错误(查看 - > IDE日志)。 您也可以清理日 ... -
您的第一个问题是,Java没有理由解析您提供的路径,它不是Windows命令行解释器。 要获取当前用户名,请尝试 String username = System.getProperty("user.name"); 并替代它。 但是,这仍然很危险,因为Windows上的用户目录可能位于不同的地方,或者没有完整的用户名。 请参阅Windows下的java,如何找到重定向的桌面文件夹? 有关更详细的选项,这将更可靠,请查看此如何获取Java中的桌面路径 Your first problem is that J ...