最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to give space in javascript? - Stack Overflow

programmeradmin1浏览0评论

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> 

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> 
Share Improve this question asked Sep 13, 2011 at 10:18 user676589user676589
Add a comment  | 

5 Answers 5

Reset to default 7
<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)

  1. 暂无评论