UNPKG

basic-ui-js

Version:

A lightweight JavaScript library for building web-based applications with simple code. No need to write HTML or CSS — just use basic JavaScript.

51 lines (38 loc) 1.42 kB
<!DOCTYPE html> <html> <head> <title>Button Example</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <!-- LIBRARY FILES --> <link rel="stylesheet" type="text/css" href="basic/basic.min.css"> <script src="basic/basic.min.js" type="text/javascript" charset="utf-8"></script> <script> let btnBlue; // First running function. window.onload = function() { // BUTTON: First Button. Parameters: (left, top, width, height, props) btnBlue = Button(40, 40, 180, 50, { text: "HELLO", minimal: 1, //round: 14, //border: 3, //borderColor: "rgba(0, 0, 0, 0.1)", //fontSize: 22, //textColor: "rgba(0, 0, 0, 0.7)", //width: "auto", //padding: [20, 0], //color: "orangered", }); //that.elem.style.fontFamily = "opensans-bold"; that.on("click", printHelloWorld); }; const printHelloWorld = function() { println("Hello World"); }; </script> </head> <body> <!-- HTML content --> </body> </html>