xhtml

What content can be outside head and body tags?

流过昼夜 提交于 2020-01-19 16:25:45
问题 This may seem like a weird question, but i'm building some script that reads HTML files and i'm dividing the content to 2, body and head and was wondering if there could be other content i might not know of? The only thing i know of is <DOCTYPE> and i was wondering if there could be more? 回答1: The doctype declaration isn't exactly content in the sense of the word. There isn't any content that is supposed to exist outside head and body (and in fact, any content that's meant to display should

valid xhtml meta tags for facebook open-graph and twitter cards

倖福魔咒の 提交于 2020-01-19 06:21:07
问题 to make valid: xhtml twitter cards facebook-graph-api for http://www.theyact.com/acting-classes/los-angeles/ I've managed to get my code to come up valid everywhere... save 1 error on http://validator.w3.org/ there is no attribute "property" but only 1 instance among the many in the code, only the below seems to ruffle the validator's feathers: <meta name="og:description" property="og:description" content="... I'd like the code to be completely valid in validator.w3.org's eyes. What am I

Focus Input Box On Load

孤人 提交于 2020-01-19 04:43:46
问题 How can the cursor be focus on a specific input box on page load? Is it posible to retain initial text value as well and place cursor at end of input? <input type="text" size="25" id="myinputbox" class="input-text" name="input2" value = "initial text" /> 回答1: There are two parts to your question. 1) How to focus an input on page load? You can just add the autofocus attribute to the input. <input id="myinputbox" type="text" autofocus> However, this might not be supported in all browsers, so we

Focus Input Box On Load

家住魔仙堡 提交于 2020-01-19 04:43:07
问题 How can the cursor be focus on a specific input box on page load? Is it posible to retain initial text value as well and place cursor at end of input? <input type="text" size="25" id="myinputbox" class="input-text" name="input2" value = "initial text" /> 回答1: There are two parts to your question. 1) How to focus an input on page load? You can just add the autofocus attribute to the input. <input id="myinputbox" type="text" autofocus> However, this might not be supported in all browsers, so we

How to programmatically add dialogs with primefaces

不想你离开。 提交于 2020-01-17 04:33:44
问题 I want to display some data through primefaces datalist component. To achieve this I have an arrayList like ArrayList<Person> . The person class looks something like this class Person{ private String name; private String age; private ArrayList<String> hobbies; } To display the data I'm using the following code: <p:dataList value="{gameBean.persons}" var="person" itemType="disc"> Name: #{person.getName()}, Age: #{person.getAge()}, <h:link value="Hobbies" onclick="dlg1.show();" /> </p:dataList>

meta http-equiv X-UA-Compatible

你离开我真会死。 提交于 2020-01-17 03:53:08
问题 <meta http-equiv="X-UA-Compatible" content="IE=9" > the above line of code forces the browser to make Document mode to IE 9 standard and Browser mode to IE 9 Compatiblity mode How can i make Document mode to IE 9 standard and browser mode to IE 9 mode 回答1: this works for me.. <!DOCTYPE html> <html> <head> <title>title</title> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> 回答2: Do you have any other links or scripts above your X-UA-Compatible meta tag in your <head> ? If so

Set the source of Adobe PDF browser plugin to be a byte stream?

[亡魂溺海] 提交于 2020-01-16 08:53:12
问题 Is it possible to have the source for an Adobe Plugin to be a PDF byte stream? If so, how would this be declared in markup? EDIT 1: OK, so let me elaborate on this. I have built a site that runs on Azure. The site's back-end is a WCF web service, also on Azure. One particular functionality of the site has to do with reporting. Once the user selects the type of report they want, a request is made to the service and a byte stream of a pdf file is sent back as a response. Now, the question is

Escaping Double Quotes in HTML Event Handlers

穿精又带淫゛_ 提交于 2020-01-15 12:47:08
问题 How do I escape double quotes in an event handler in HTML? For example, how do I properly escape the bar , which is a string literal, in the following code? <button onclick="foo("bar")")>Click Me</button> I can't use single quotes for the attribute value since I'm using XHTML. I could use single quotes for string literals, but I'd like to be consistent. 回答1: <button onclick="foo("bar");">Click Me</button> And, you can mix them indeed in XHTML, try this in the W3 validator: <?xml version="1.0"

docx4j cannot render <text-indent>

余生长醉 提交于 2020-01-15 11:17:30
问题 I am using docx4j-ImportXHTML to convert an XHTML into a docx. When rendering to docx I notice it doesn't render CSS text-indent property. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Title of document</title> </head> <body> <p style="text-indent:100px;">indent text</p> </body> </html> When running above code I do not see any indentation of the first line of

custom data attributes alternative?

无人久伴 提交于 2020-01-15 07:58:06
问题 The following code is in a while loop, with values from the database. I am storing these values in custom data attributes for jQuery. <div class='pending-information' data-id='$id' data-pid='$position' data-sid='$sid' data-image='$image' data-counter='$counter' data-start='$start'></div> What is the professional approach? This method won't be valid in XHTML1. So whats the common method for storing attributes/values for jQuery? 回答1: What is the professional approach? Exactly what you are doing