# Example of input type button in html?

**URL:** <https://community.particle.io/t/example-of-input-type-button-in-html/22723>\
**Category:** General\
**Created:** [May 6, 2016, 7:56pm UTC](https://community.particle.io/t/example-of-input-type-button-in-html/22723 "2016-05-06T19:56:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [May 6, 2016, 7:59pm UTC](https://community.particle.io/t/example-of-input-type-button-in-html/22723/2 "2016-05-06T19:59:44Z")

</div>

That looks an awful lot like some code I once wrote, which was intended to be used with the JavaScript library, which is also why that doesn't work. There's no 'magic Particle parameter'. That 'onclick' simply calls a Javascript function which in turn makes the request.  
This guide discusses how to call the API directly, and has an example of what you're looking for:

> [@Tutorial: Spark Variable and Function on One Web Page](https://community.particle.io/t/tutorial-spark-variable-and-function-on-one-web-page/4181):
>
> Let’s say you have a Spark core with both a Spark variable and a Spark function. In my case, I have the world’s simplest servo control sketch, using the nice miniature servo in the Spark Maker Kit. Using these parts, we will build a servo that you can control from a web page anywhere and monitor the position of the servo too! Here’s a preview of the finished tutorial: [image] There is a coarse adjust slider, two fine adjust buttons, and the current position of the servo is displayed. That…

---

_[View the full topic](https://community.particle.io/t/example-of-input-type-button-in-html/22723)._
