这是标准复选框的代码:
<fieldset data-role="controlgroup">
<legend>Agree to the terms:</legend>
<input type="checkbox" name="checkbox-1" id="checkbox-1" class="custom" />
<label for="checkbox-1">I agree</label>
</fieldset>
Run Code Online (Sandbox Code Playgroud)
如何将复选框的标签(文本)设置为右侧或固定的“px”位置?
像align-right或right: 50px
这是XML文件:
<Test>
<Category>
<SubCat>
<Name>Name</Name>
<Properties>
<Key>Key</Key>
<Value>Value</Value>
</Properties>
</SubCat>
<SubCat>
<Name>Name</Name>
<SubCat>
<Name>AnotherName</Name>
<Properties>
<Key>Key</Key>
<Value>Value</Value>
</Properties>
</SubCat>
</SubCat>
</Category>
</Test>
Run Code Online (Sandbox Code Playgroud)
我想得到这个名字.但只有第一个SubCat的名称.和属性键值.问题是SubCat存在两次.
我试过这个:
$(xml).find('SubCat').each(function() {
var name = $(this).find("Name").text();
alert(name);
}
Run Code Online (Sandbox Code Playgroud)
但这显示了第一个和第二个SubCat的名称.
我搜索这样的东西.
rootElement(Category).selectallchildren(SubCat).Name for the first SubCat Name
rootElement(Category).selectallchildren(SubCat).(SubCat).Name for the second SubCat Name
Run Code Online (Sandbox Code Playgroud)
并且明确选择Key和值
如何设置包含两个内容边的HTML页面?没有<frames>!
例如:
在左侧应该是导航菜单.在右侧应该是页面的内容.
示例菜单:
<div id="page">
<div id="menuleftcontent">
<ul id="menu">
<li> <a href="showfirstcontent">first</a></li>
<li><a href="showsecondcontent">second</a></li>
</ul>
</div>
<div id="maincontent">
<div id="firstcontent">first</div>
<div id="secondcontent">second</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
左侧的菜单应该是修复内容,正确的内容应该是可更改的.
我做了一个草图:

提前致谢