1. Home
  2. /
  3. Framework7
  4. /
  5. Multi Counter

Multi Counter - Framework7 Typing CST Test

Loading…

Multi Counter — Framework7 Code

Multiple independent counters in a single view using Framework7.

<!DOCTYPE html>
<html>
	<head>
		<link rel="stylesheet" href="https://unpkg.com/framework7/framework7-bundle.min.css">
		<script src="https://unpkg.com/framework7/framework7-bundle.min.js"></script>
	</head>
	<body>
		<div id="app">
		<div class="view view-main">
		<div class="page">
		<div class="navbar"><div class="title">Multi Counter</div></div>
		<div class="page-content" style="text-align:center;">
		<p id="count1" style="font-size:24px;">0</p>
		<p id="count2" style="font-size:24px;">0</p>
		<button onclick="increment(1)">+ Counter 1</button>
		<button onclick="increment(2)">+ Counter 2</button>
		</div>
		</div>
		</div>
		</div>

		<script>
		let counters = [0,0];
		function render() {
		document.getElementById('count1').textContent = counters[0];
		document.getElementById('count2').textContent = counters[1];
		}
		function increment(i) { counters[i-1]++; render(); }
		render();
		</script>
	</body>
</html>

Framework7 Language Guide

Onsen UI is an open-source framework for building hybrid and mobile web apps using HTML5, CSS, and JavaScript. It provides ready-to-use UI components optimized for iOS and Android, supporting frameworks like Angular, React, and Vue.

Primary Use Cases

  • ▸Hybrid mobile apps for iOS and Android
  • ▸Progressive Web Apps (PWAs)
  • ▸Rapid prototyping of mobile interfaces
  • ▸Apps needing consistent cross-platform UI
  • ▸Integration with Angular, React, or Vue frameworks

Notable Features

  • ▸Platform-aware UI components that adapt to iOS and Android styles
  • ▸Framework-agnostic core with bindings for Angular, React, and Vue
  • ▸Built-in animations and touch gestures
  • ▸Lightweight and optimized for performance
  • ▸Supports Cordova/Capacitor for native device access

Origin & Creator

Developed by Monaca (Asial Corporation) in 2013, Onsen UI was created to simplify hybrid mobile app development using web technologies while providing native-like UI components.

Industrial Note

Best suited for hybrid apps and progressive web apps requiring native-style UI with minimal platform-specific customization.

More Framework7 Typing Exercises

Framework7 Simple Todo AppFramework7 Counter AppFramework7 Step CounterFramework7 Dark Mode Counter

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher