我正在尝试以更节省时间的方式制作清单。 我必须像17次一样在每页下面执行此操作。 因此,为了节省时间,我希望Emmet成为解决方案。 重要的是要说的是,我想选择三个名称并立即执行所有操作。我与Coda 2合作。 选择以下几行后产生以下代码的缩写:
^ - Start of input
\d+ - one or more digits
(?:' - Noncapture group followed by singlequote
(?: - Start of non-capture group
+\d+" - Matches one or more space followed by one or more digits followed by doublequote
(?: +\d+\/\d+)? - Matches one or more space followed by one or more digits then literal / then again one or more digits and whole of it is optional as it is placed inside non-capture group followed by ?
)? - Closing of previous non-capture group and ? means even that group is optional
|") - Alternation to support case where number can only be followed by double quote and close of group
$ - End of input
生产:
Video
DVD
CD
为什么不起作用:(div [class = form-group]>。[class = col-sm-12]>。[class = checkbox]> label [for = list $]> input [type = checkbox name = item $ value = Gedaan id = list $])*
当我尝试此操作时,我得到:
<div class="form-group">
<div class="col-sm-12">
<div class="checkbox">
<label>
<input type="checkbox" name="item1" value="Done" /> Video
</label>
</div>
</div>
</div> <!-- form-group -->
<div class="form-group">
<div class="col-sm-12">
<div class="checkbox">
<label>
<input type="checkbox" name="item2" value="Done" /> DVD
</label>
</div>
</div>
</div> <!-- form-group -->
<div class="form-group">
<div class="col-sm-12">
<div class="checkbox">
<label>
<input type="checkbox" name="item3" value="Done" /> CD
</label>
</div>
</div>
</div> <!-- form-group -->
好的,我走得更远。
现在它可用于多行。 但是de Video,CD,DVD保留在最后一个表单组中。
我再次使用了这个: (div [class = form-group]>。[class = col-sm-12]>。[class = checkbox]> label [for = list $]> input [type = checkbox name = item $ value = Gedaan id = list $])*
我的结果:
<div class="form-group">
<div class="col-sm-12">
<div class="checkbox"><label for=""><input type="checkbox" name="item1" value="done"></label></div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<div class="checkbox"><label for=""><input type="checkbox" name="item2" value="done"></label></div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<div class="checkbox"><label for=""><input type="checkbox" name="item3" value="done">Video
DVD
CD</label></div>
</div>
</div>
答案 0 :(得分:0)
这对我有用:
(.form-group>.col-sm-12>.checkbox>label>input[type=checkbox][name="item$"][value="done"])*
生成的HTML:
<div class="form-group">
<div class="col-sm-12">
<div class="checkbox">
<label for="">
<input type="checkbox" name="item1" value="done">Video
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<div class="checkbox">
<label for="">
<input type="checkbox" name="item2" value="done">CD
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<div class="checkbox">
<label for="">
<input type="checkbox" name="item3" value="done">DVD
</label>
</div>
</div>
</div>
我尝试过您的产品,并且也可以使用,除了部分value=Gedaan
:
答案 1 :(得分:0)
找到答案:
(div [class = form-group]>。[class = col-sm-12]>。[class = checkbox]> label [for = list $]> input [type = checkbox name = item $ value = Gedaan id = list $]){} *
{}让txt放回背面