- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML5 data-* attribute type casting strings and numbers
For data-attribute typecasting of Numbers and String, use −
[...document.querySelectorAll("a")].forEach(a => console.log("type: %s, value: %o", typeof a.dataset.value, a.dataset.value) );
The above is for the following data-attributes −
<a data-value = "6.0">6.0</a> <a data-value = "6.5">6.5</a>
- Difference Between Type casting and Type Conversion
- Java Type Casting Examples
- Type Casting operators in C++
- What is the difference between type conversion and type casting in C#?
- What is Type casting in C#?
- Explicit type casting operator in C++
- Explicit Type Casting in Python Language
- const_cast in C++ - Type casting operators
- HTML5 preload attribute
- Best data type for storing large strings in MySQL?
- What are up-casting and down-casting in Java?
- Return True if cast between scalar and data type can occur according to the casting rule in Python
- Usage of autofocus HTML5 attribute
- Composition attribute in HTML5 Canvas?