Jump to content
php.lv forumi
  • 0

onchange


SaMay

Question

<script type="text/javascript">

function show(objSel) {

document.getElementById('display').innerHTML = objSel.options[objSel.selectedIndex].value;

}

</script>

<tr><td>Kkas </td><td id="tds"><select name="kkas" onchange="show(this);">

<option value="Teksts1">Teksts</option>

<option value="Teksts2">Cits teksts</option>

</select></td></tr>

 

<tr><td id="display" colspan="2"></td></tr>

 

Sveiki. Nepieciešams, lai tas Teksts1 iekš display parādās jau pie lapas ielādes.

Ceru ka kāds izlīdzēs. :)

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...