开发者

javascript return value for ToolTip

I am using this value for to display it in tooltip .

return 'Date '+dateData[obj.x]+'value '+obj.y+'';

Is it possible to show in two lines (one for Date ) and (two for value)

This is the way i want to show

Date 12/23/45
value 23

But currently 开发者_Go百科this is shown in a single line only

Date 12/23/45 value 23

I have tried this way , but this isn't working

return 'Date '+dateData[obj.x]+'value\n '+obj.y+'';



return 'Date '+dateData[obj.x]+'<BR>value '+obj.y+'';

The br element’s purpose is very simple: it creates a line break within a block of text, leaving no padding or margins between the two blocks of text created by the line break. While it’s still perfectly valid to use this element in XHTML Strict pages (it’s not on the list of deprecated elements), you need to take care that you don’t misuse it, because:

It can be used in a presentational manner. For example, you might use a series of br elements in succession to create a new paragraph effect, instead of simply using a or a blockquote, and applying CSS to set the layout.

Using br elements becomes a real headache if, later, you want to correct visual inconsistencies and have to sweep through hundreds of files to strip them out.

There are some exceptional cases in which you might be forced to use a br element:

In poetry, a new line requires just that: a new line. You can’t use a p element in this case. (Evidently poetry wasn’t high on the list of markup requirements when the HTML recommendations were thrashed out!)

When you’re marking up a postal address, you may need to create single line breaks. However, with the advent of Microformats, there’s quite a well-established method for dealing with postal (and other) address types that avoids the use of the br while offering additional semantic richness. Refer to the section titled http://reference.sitepoint.com/html/hcard/ for more.

http://reference.sitepoint.com/html/br

I hope this has been a helpful article for you

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜