Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

JS-Doppeklick : Text to Form

Empfohlene Antworten

Veröffentlicht

Mahlzeit,

Ich zerbereche mir die ganze Zeit schon den Kopf wie ich am besten folgendes Lösen könnte.

Angenommen ich habe eine div

<div id="hassenichtgesehen">Inhalt</div>
nun soll es so sein das
<div id="hassenichtgesehen" ondblclick="javascript:makeToForm(1);">Inhalt</div>
Der Inhalt zu
<div id="hassenichtgesehen" ondblclick="javascript:makeToForm(1);"><input type="text" name="bla" value="Inhalt"></div>
wird. Ich brauche quasi einen Ansatz für die Funktion

function makeToForum(inp) {

// Funktionalitaet

}

Ich habe keinerlei Ahnung wie ich das realisieren soll

Vllt. hat ja einer eine Idee wäre sehr dankbar

Problem hat sich gelöst ...


<script language="JavaScript" type="text/javascript">

function makeForm(val) {

document.getElementById("hassenichtgesehen").innerHTML = '<input type="text" name="bla" value="'+val+'" size="25" maxlenght="60">';

}

</script>

<span ondblclick="javascript:makeForm('Bla Bla Bla');">Bla Bla Bla</span>

[/html]

Du könntest auch ohne das ganze innerHTML auskommen.

Stichwort "style.display = 'none';" bzw. "style.display = 'block';"

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.