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 +' ')
</script>
try this
<script type="text/javascript>
$("#thumbnail").append(response)
$("#thumbnail").append(" ");
</script>
Are you looking for the
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;
}
精彩评论