开发者

How to give space in javascript?

I have a response where I have an Image in that response and after every response I need to give a space.How can I do that?

Any help will be appreciated!

Here is my script:

<script type="text/javascript>
    $("#thumbnail").append(response)
</script&开发者_如何转开发gt; 


<script type="text/javascript>
    $("#thumbnail").append(response +'&nbsp;')
</script>


try this

<script type="text/javascript>
$("#thumbnail").append(response)
$("#thumbnail").append("&nbsp;");
</script> 


Are you looking for the &nbsp; html character? or are you looking to apply a padding or margin?


It depends on what sort of space you want.

Determine what markup and styling you want. Maybe a literal " ", maybe a margin.

Add the appropriate CSS to your stylesheet, then write JS that adds the appropriate markup.


Using css:

#thumbnail img {
   margin-right: yourspace;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜