问题描述
我已经使用Jquery Mobile获得了以下代码:
i've got this code using Jquery Mobile :
<div role="main" class="ui-content">
<form action="/" method="post">
<fieldset data-role="controlgroup">
<input type="checkbox" name="checkbox-1a" id="checkbox-1a" checked="">
<label for="checkbox-1a">Cheetos</label>
<input type="checkbox" name="checkbox-2a" id="checkbox-2a">
<label for="checkbox-2a">Doritos</label>
<input type="checkbox" name="checkbox-3a" id="checkbox-3a">
<label for="checkbox-3a">Fritos</label>
<input type="checkbox" name="checkbox-4a" id="checkbox-4a">
<label for="checkbox-4a">Sun Chips</label>
</fieldset>
</form>
</div>
问题是,当我加载页面时,代码看起来像这样:
The problem is that when i load the page the codes looks like this :
<div class="ui-controlgroup-controls ">
<div class="ui-checkbox">
我跳过了整个代码,问题出在
I've skipped the whole code, the problem is in the
那不应该在那里.关于如何解决它的任何想法?
that should not be there.Any idea about how to fix it?
推荐答案
从他们的网站复制和粘贴源代码时会出现此问题.
This problem comes when copying and pasting the source code from their website.
实际上,您还以这种方式复制了浏览器转换为
的不可见空格,并使最后一块下降.
In fact in this way you copy also invisible blank spaces which are converted as
by the browser and make the last block go down.
要解决此问题,只需删除标记之间的所有空格,所有空格将正确显示.
To solve the issue simply remove all the spaces between the tags and all will be displayed correctly.
这篇关于jQuery Mobile自动添加& nbsp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!