49 lines
1.1 KiB
HTML
49 lines
1.1 KiB
HTML
<!--
|
|
Simulate a standard push button using JavaScript Image objects.
|
|
This works by defining various event handlers directly in
|
|
the IMG element. The onMouseDown handler calls event.preventDefault()
|
|
to inhibit a drag gesture during button tracking. Thanks to
|
|
lordpixel@mac.com for providing sample DHTML to start from.
|
|
-->
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>Aligned Buttons</TITLE>
|
|
<STYLE>
|
|
IMG.button { vertical-align: top }
|
|
IMG.defaultButton { margin-top: -4px; margin-left: -4px }
|
|
</STYLE>
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" onMouseUp="isMouseDown=false;">
|
|
<H1>Aligned Buttons</H1>
|
|
<DIV>
|
|
<IMG
|
|
id="Cancel"
|
|
name="Cancel"
|
|
class="button"
|
|
src="theme:button?width=58&height=20&title=Cancel"
|
|
>
|
|
<IMG
|
|
id="OK"
|
|
name="OK"
|
|
class="defaultButton"
|
|
src="theme:button?width=58&height=20&default=true&pressed=true&title=OK"
|
|
>
|
|
</DIV>
|
|
<BR>
|
|
<DIV>
|
|
<IMG
|
|
id="Cancel"
|
|
name="Cancel"
|
|
class="button"
|
|
src="theme:button?width=58&height=20&pressed=true&title=Cancel"
|
|
>
|
|
<IMG
|
|
id="OK"
|
|
name="OK"
|
|
class="defaultButton"
|
|
src="theme:button?width=58&height=20&default=true&title=OK"
|
|
>
|
|
</DIV>
|
|
</BODY>
|
|
</HTML>
|