给定以下类和控制器操作方法:
public School
{
public Int32 ID { get; set; }
publig String Name { get; set; }
public Address Address { get; set; }
}
public class Address
{
public string Street1 { get; set; }
public string City { get; set; }
public String ZipCode { get; set; }
public String State { get; set; }
public String Country { get; set; }
}
[Authorize(Roles = "SchoolEditor")]
[AcceptVerbs(HttpVerbs.Post)]
public SchoolResponse Edit(Int32 id, FormCollection form)
{
School school = …Run Code Online (Sandbox Code Playgroud) 我有一个看起来像这样的XML文档:
<event>
<foo.bar>content</foo.bar>
</event>
Run Code Online (Sandbox Code Playgroud)
我使用jQuery来读取这个xml文档,如下所示:
var $xml = $( $.parseXML(xmlStr) );
Run Code Online (Sandbox Code Playgroud)
当我尝试选择foo.bar节点时,它将搜索名为foo和类栏的节点.如何通过标记名选择此节点?
$xml.find( "foo.bar" ) //returns nothing, searches for tag foo with class bar
Run Code Online (Sandbox Code Playgroud) 我观察到了这一点
$("#bank1.bankName").hide();
Run Code Online (Sandbox Code Playgroud)
不起作用
$("test").hide()
Run Code Online (Sandbox Code Playgroud)
作品
这是什么原因?什么是可能的解决方案
编辑包括标记
<td id = "bank1.bankName">
<form:input path="bankDetails[0].bankName" size = "12"/>
</td>
Run Code Online (Sandbox Code Playgroud)
我正在使用Spring MVC
我试图使用jQuery通过ID选择一个表单.目前,我的代码无法通过ID查找表单.但是,使用jQuery选择页面上的所有表单确实选择表单并显示相应的ID.关于为什么会发生这种情况的唯一想法可能是我的表单的ID使用了无效字符.
console.log("Forms:", $('form'));
console.log("OrderDetailsForm:", $('form#CableSolve.Web.Models.Workflow.ExistingOrderDetailsModel'));
Run Code Online (Sandbox Code Playgroud)
