xhtml

Convert html to doc in java

寵の児 提交于 2019-12-28 06:47:25
问题 I would like to convert either an html or xhtml document (preferably with styles) to Microsoft .doc and/or .docx format. There seem to be plenty of examples for doing this the other way around but I haven't found any useful examples for converting to ms document formats. Can anyone point me to an api or provide an example for doing this please Many thanks 回答1: docx4j 2.8.0 supports converting XHTML documents and fragments to docx content. Disclosure: I wrote some of the code. 回答2: Yet another

Move jQuery to the end of body tag?

不想你离开。 提交于 2019-12-28 05:46:06
问题 My friend read an article which mentioned that moving all JavaScript files to the end of the closing body tag ( </body> ), will improve the performance of a web page. I have moved all JS files to the end except the JQuery and the JS files which are attaching event to an element on page, like below; $(document).ready(function(){ //submit data $("#create_video").click(function(){ //... }); }); but he's saying to move the jQuery library file to the end of body tag. I don't think it is possible,

Specifying Tab-Width?

三世轮回 提交于 2019-12-28 01:53:52
问题 Is it possible to define the tab-width when whitespace is displayed (say within a <pre> tag or something)? I can't find anything to do this with CSS, but this seems like it would be a pretty common thing to want to do. In my case, the tab width is so wide that it causes some of my code snippets on a page to be too wide. If I could somehow shorten the tab-width to make it fit without scrollbars it would make things much easier. (I suppose I could just replace the tabs with spaces, but ideally

Can XHTML and HTML class attributes value start with a number?

五迷三道 提交于 2019-12-28 01:28:07
问题 Can XHTML and HTML class attributes value start with a number? 回答1: No . They have to be SGML names. They "must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). However, class names that start with a number are supported by IE. EDIT : meder pointed out that you can use Unicode characters and they seem to work in all browsers. I don't know if it complies with the specifications, but

Reading cookie expiration date

痴心易碎 提交于 2019-12-28 01:08:29
问题 Is it possible to read cookie expiration date using JavaScript? If yes, how? If not, is there a source I can look at? 回答1: It is not possible to get the expiration date of a cookie through Javascript; only key-value pairs are exposed through document.cookie . 回答2: If you are using Chrome you can goto the "Application" tab (within Developer Tools) and find the item "Cookies" in the left sidebar. From there select the domain you are checking the set cookie for and it will give you a list of

CSS @font-face not working in ie

☆樱花仙子☆ 提交于 2019-12-27 22:04:46
问题 I have the following CSS that works within Firefox but not IE. Obviously, the fonts are within the directory. Any suggestions? @font-face { font-family: "Futura"; src: url("../fonts/Futura_Medium_BT.eot"); /* IE */ src: local("Futura"), url( "../fonts/Futura_Medium_BT.ttf" ) format("truetype"); /* non-IE */ } body nav { font-family: Futura, Verdana, Arial, sans-serif; font-size:1.2em; height: 40px; } 回答1: I read a lot of tutorials that suggested hacks, so I came up with this solution I think

How do I achieve equal height divs (positioned side by side) with HTML / CSS ?

寵の児 提交于 2019-12-27 11:24:59
问题 I have two divs inside of a container. One on the left, one on the right, side by side. How am I able to make each one be of equal height, even though they have different content. For example, the right div has a lot of content, and is double the height of the left div, how do I make the left div stretch to the same height of the right div? Is there some JavaScript (jQuery) code to accomplish this? 回答1: You could use jQuery, but there are better ways to do this. This sort of question comes up

HTML form string error [closed]

限于喜欢 提交于 2019-12-26 15:17:03
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . When I click the "Send "Request" button, the query string ?req_flag=0 disappears from the URL. Where am I making a mistake here? I need following URL: localhost/flavourr/send_req.php?req_flag=0&f_e_mail_add=value

How to swap a disabled option DOM element to enabled?

半城伤御伤魂 提交于 2019-12-25 16:57:29
问题 I have a list with enabled and disabled option. I do know how to disable an option element but what I don't know how to enable it again. <select size="1" id="x"> <option value="47" disabled="disabled">Value 47</option> ... selectElement.options[i].disabled = 'disabled'; // ... how to enable? It should be done with Plain Javascript and no JavaScript Framework. (I wish I could use Prototype or a similar framework but I cannot introduce one of them.) 回答1: Use setAttribute and removeAttribute:

IE6 Not caching my images

自作多情 提交于 2019-12-25 11:56:46
问题 I uploaded my web application already in my Production Tomcat Web Server. I am trying to test it already and it works fine on FF/IE7/IE8 but I am having a problem on display on IE6. I notice in the status bar that IE6 seems to be downloading the images every now and then. Even though I did not click anything, it still downloads the images. I am using a menu that uses images and it does not display well on IE6. Problem is that 60% of my targeted user runs on this browser. I am beginning to