--- title: slug: Web/MathML/Element/maction tags: - MathML - 'MathML:Element' - Referenz translation_of: Web/MathML/Element/maction ---
{{MathMLRef}}

Das <maction>-Element verbindet Ausdrücke oder Teile von Ausdrücken mit Aktionen. Die Aktion wird durch das Attribute actiontype benannt. Mit dem Attribut selection kann ein bestimmtes Kind-Element gezielt ausgewählt werden.

Attribute

actiontype
Bestimmt, welche Aktion mit diesem Ausdruck verbunden werden soll. Mögliche Werte sind:
  • statusline: Wenn der expression angeklickt wird oder der Nutzer den Mauszeiger über den Ausdruck bewegt, dann wird message in der Statuszeile des Browsers eingeblendet. Die Syntax ist: <maction actiontype="statusline"> expression message </maction>.
  • toggle: Wenn der Ausdruck mit der Maus angeklickt wird, dann wechselt die Darstellung zum nächsten der Ausdrücke. Jeder Klick setzt den Wert von selection um eins herauf, nach dem letzten Ausdruck folgt wieder der erste.
    The syntax is: <maction actiontype="toggle" selection="positive-integer" > expression1 expression2 expressionN </maction>.
  • tooltip {{ unimplemented_inline() }} : Wenn der Mauszeiger über expression bewegt wird, dann wird ein Tooltip mit dem Text message angezeigt.
    Die Syntax ist: <maction actiontype="tooltip"> expression message </maction>.
class, id, style
Zur Einbindung von CSS-Stylesheets und zur direkten Anwendung von CSS-Angaben.
href
Mit diesem Attribut kann ein Link gesetzt werden.
mathbackground
Die Hintergrundfarbe. Folgende Notationen sind erlaubt: #rgb, #rrggbb und HTML-Farbnamen.
mathcolor
Die Textfarbe. Folgende Notationen sind erlaubt: #rgb, #rrggbb und HTML-Farbnamen.
selection
Benennt das Kind-Element für die Aktion. Der Vorgabewert ist 1 für das erste Kind-Element. Die Darstellung beginnt mit dem so benannte Ausdruck. Dieses Attribut wirkt nur bei actiontype=toggle.

Beispiele

Dieses Beispiel nutzt den "toggle" actiontype, um zwischen drei Ausdrücken zyklisch umzuschalten:

<math>

<maction actiontype="toggle">

  <mfrac>
    <mn>6</mn>
    <mn>8</mn>
  </mfrac>

  <mfrac>
    <mrow>
      <mn>3</mn>
      <mo>&sdot;</mo>
      <mn>2</mn>
    </mrow>
    <mrow>
      <mn>4</mn>
      <mo>&sdot;</mo>
      <mn>2</mn>
    </mrow>
  </mfrac>

  <mfrac>
    <mn>3</mn>
    <mn>4</mn>
  </mfrac>

</maction>

</math>

Spezifikationen

Standard Status Bemerkung
{{ SpecName('MathML3', 'chapter3.html#presm.maction', 'maction') }} {{ Spec2('MathML3') }} Current specification
{{ SpecName('MathML2', 'chapter3.html#presm.maction', 'maction') }} {{ Spec2('MathML2') }} Initial specification

Browserkompatibilität

{{CompatibilityTable}}

Merkmal Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{CompatNo}} {{ CompatGeckoDesktop("1.0") }} {{CompatNo}} {{CompatNo}} {{CompatNo}} [2]
actiontype {{CompatNo}} {{CompatVersionUnknown}} [1] {{CompatNo}} {{CompatNo}} {{CompatNo}}
href {{CompatNo}} {{ CompatGeckoDesktop("7.0") }} {{CompatNo}} {{CompatNo}} {{CompatNo}} [3]
mathbackground {{CompatNo}} {{ CompatGeckoDesktop("2.0") }} {{CompatNo}} {{CompatNo}} {{CompatNo}}
mathcolor {{CompatNo}} {{ CompatGeckoDesktop("2.0") }} {{CompatNo}} {{CompatNo}} {{CompatNo}}
Merkmal Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatNo}} {{CompatNo}} {{ CompatGeckoMobile("1.0") }} {{CompatNo}} {{CompatNo}} {{CompatNo}}
actiontype {{CompatNo}} {{CompatNo}} {{CompatVersionUnknown}} [1] {{CompatNo}} {{CompatNo}} {{CompatNo}}
href {{CompatNo}} {{CompatNo}} {{ CompatGeckoMobile("7.0") }} {{CompatNo}} {{CompatNo}} {{CompatNo}}
mathbackground {{CompatNo}} {{CompatNo}} {{ CompatGeckoMobile("2.0") }} {{CompatNo}} {{CompatNo}} {{CompatNo}}
mathcolor {{CompatNo}} {{CompatNo}} {{ CompatGeckoMobile("2.0") }} {{CompatNo}} {{CompatNo}} {{CompatNo}}

[1] toggle & statusline. tooltip sind nicht implementiert bug 544001.

[2] Siehe WebKit bug 85734.

[3] Siehe WebKit bug 85733.

Hinweise zu Gecko