Microsoft HTA/CSS and JavaScript

From Computernewb Wiki
Revision as of 22:58, 17 May 2022 by Dartz (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
< Microsoft HTA/Window styles and attributes!Microsoft HTA/Changing Internet Explorer Version >

HTA, like HTML, can have CSS and JavaScript. As HTA runs on Internet Explorer, it may not fully support CSS3 and ES6. You can use <style> and <script> tags or inline CSS/JS to use styles and scripts.


Language: HTA
<!DOCTYPE html>
    <title>Hello, world!</title>
      APPLICATIONNAME = "Hello, world!"
      body {
        background: red;
        color: blue;
        text-align: center;
      function helloWorld() {
        document.getElementById('demo').innerHTML = 'You clicked it!!';
    <h1 id="demo" style="background:black;padding:8px">Hello, world!</h1>
    <button onclick="helloWorld();">Click me!</button>