<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="showxiaoguo.js"></script>
</head>
<body>
<div><span id="item">TestText</span></div>
<div><input id="hello" type="text" style="width: 200px;" /></div>
<div><input type="button" value="Inert on input" id="insertA" /></div>
<div><textarea id="world" style="width: 200px;height:50px;"></textarea>
<div><input type="button" value="Inert on Textarea" id="insertT" /></div>
<script language="JavaScript" type="text/javascript">
(function($){
$('#hello').setCaret();
$('#insertA').click(function(){
$('#hello').insertAtCaret('我是图片地址');
});
$('#world').setCaret();
$('#insertT').click(function(){
$('#world').insertAtCaret('[img][/img]');
$('#world').trigger('focus');
});
})($);
</script>
</body></html>
- 1
- 2
- 3
- 4
前往页