<title> use layer implementation to insert a picture in a textarea form </title>
<script language= "javascript tutorial" type= "Text/javascript" >
/*
Function: Use layer implementation to insert picture in textarea
Development: Wangsdong
Source:. NET Tutorials ">www.111cn.net
Original works, transfer please save this information
*/
var pos;
function GetPos ()
{
pos = Document.selection.createRange ();
}
function Fun (str)
{
if (pos!=null)
{
pos.text= "Insert text content";
Pos.pastehtml ("Pos.pastehtml ("<br/> TextBox control: <input id= ' Text1 ' type= ' text '/>");
Release location
Pos=null;
}
Else
{
Alert ("Www.111cn.net prompts you: No position selected correctly");
}
}
</script>
<body>
<form name= "Form1" method= "Post" action= "1.asp Tutorial" onsubmit= "document.getElementById (' content '). value= document.getElementById (' Mydiv '). InnerHTML ">
<div style= "width:350px;" >
</div>
<div id= "mydiv" style= "width:300px; height:100px; Border:black 1px solid; Font-size:small; Line-height:1; Overflow:auto; "
Onclick= "GetPos ();" Onkeyup= "GetPos ();" Contenteditable= "true" >
Abcdefg</div>
<div>
<input type= "hidden" value= "name=" content "id=" Content ">
<input type= "Submit" value= "submitted" Name= "Submission" >
</div>
</form>
</body>