w3c

Javascript Function to add/remove fields

天涯浪子 提交于 2019-12-23 20:48:36
问题 I'm not very experienced with JavaScript, but this code was similar to what I was looking for , especially where it includes the 'Remove Field' link. Here is the Javscript function: //Add more fields dynamically. function addField(field,area,limit) { if(!document.getElementById) return; //Prevent older browsers from getting any further. var field_area = document.getElementById(area); var all_inputs = field_area.getElementsByTagName("input"); //Get all the input fields in the given area. /

Is it not necessary to close the tag in HTML 5 like HTML?

这一生的挚爱 提交于 2019-12-23 09:47:40
问题 Is it not necessary to close the tag in HTML 5 like HTML? or it's a bug in W3C validator Why this code is valid in W3C validator <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>title</title> <link rel="stylesheet" href="style.css"> <script src="script.js"></script> </head> <body> <p>Some Text </body> </html> I would be surprised if it's really valid in HTML5. But is there any benefit to keep this behavior valid in HTML5. Do HTML5 creators think that stricter rules of

Using XS:date i want date in format YYYYMMDD

那年仲夏 提交于 2019-12-23 09:38:26
问题 Using XSD i want to only accept date of the format YYYYMMDD in my xml field .. So how can i do that I saw this in an example will this work ?? 回答1: XML schema defines dateTime as ISO8601 with some exceptions and you should stick with this, otherwise you will get serious interoperability issues. If you want to send/receive date using different format, use simpleType with regular expression restriction and parse/format the date in your application code: <xs:simpleType name="CustomDate"> <xs

How reliable is “order” in queried NodeLists

狂风中的少年 提交于 2019-12-23 08:46:34
问题 I am wondering about this topic for quite a while. The methods in question are the following: getElementsByTagName getElementsByClassName getElementsByName querySelectorAll As far as I know, those DOM methods are the only methods which are able to return frozen or live NodeLists . For some of those methods, order is defined by W3C spec . For instance, http://www.w3.org writes the following for NodeLists returned by querySelectorAll The querySelectorAll() methods on the Document,

How reliable is “order” in queried NodeLists

戏子无情 提交于 2019-12-23 08:46:05
问题 I am wondering about this topic for quite a while. The methods in question are the following: getElementsByTagName getElementsByClassName getElementsByName querySelectorAll As far as I know, those DOM methods are the only methods which are able to return frozen or live NodeLists . For some of those methods, order is defined by W3C spec . For instance, http://www.w3.org writes the following for NodeLists returned by querySelectorAll The querySelectorAll() methods on the Document,

How might I use the W3C Markup Validator API in my .NET application?

Deadly 提交于 2019-12-23 03:58:10
问题 I found that there's an API for the W3C Markup Validator. I had earlier asked: Is there a .NET library for the W3C Markup Validator API? Assaf's answer: This API is SOAP based. If you want to use it in a .net application you can just add the web reference and code against it. Seems simple enough as it's basically a one-method API... So, I tried to "Add Service Reference" at address http://validator.w3.org/check . First the dialog displays: Please wait for service information to be downloaded.

Parse xml without tagname

瘦欲@ 提交于 2019-12-22 08:44:24
问题 I have a xml file <Response> <StatusCode>0</StatusCode> <StatusDetail>OK</StatusDetail> <AccountInfo> <element1>value</element1> <element2>value</element2> <element3>value</element2> <elementN>value</elementN> </AccountInfo> </Response> And I want parse my elements in AccountInfo, but I dont know elements tag names. Now Im using and have this code for tests, but in future I will recieve more elemenets in AccountInfo and I dont know how many or there names String name=""; String balance="";

Margin collapse and clearance [closed]

旧城冷巷雨未停 提交于 2019-12-22 01:29:26
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I am reading the W3C specs and I really don't understand that one : If the top and bottom margins of an element with clearance are adjoining, its margins collapse with the adjoining margins of following siblings but that resulting margin does not collapse with the bottom margin of

Allowed HTML 4.01 id values regex

南笙酒味 提交于 2019-12-21 07:55:17
问题 Can you help me to build a regex that matches a valid W3C HTML 4.01 id value? According with W3C specs: ID and NAME tokens 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 ("."). 回答1: You can use this regex ^[a-zA-Z][\w:.-]*$ ^ depicts the start of string [a-zA-Z] matches an uppercase or lowercase letter * matches the preceding character 1 to many times \w is similar to [a-zA-Z\d_] $

Is there an online emulating screen reader tool to test against a custom web page? [closed]

允我心安 提交于 2019-12-21 04:02:14
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . We are concerned about accessibility on our web site and would like to see how it is perceived and decoded by a common screen reader? 回答1: No. At least not one that is any good nor represents how a screen reader actually reads a page or responds to ARIA. The best answer is to test in real screen readers, ideally