只要是块级元素都可以用此属性变为输入框

<div contenteditable="true"></div>


<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<style type="text/css">
.test_box {
width: 400px; 
min-height: 120px; 
max-height: 300px;
_height: 120px; 
margin-left: auto; 
margin-right: auto; 
padding: 3px; 
outline: 0; 
border: 1px solid #a0b3d6; 
font-size: 12px; 
word-wrap: break-word;
overflow-x: hidden;
overflow-y: auto;
}
</style>
<title></title>
</head>
<body>
<!-- contenteditable 为htm5特性,可将任何block 标签变为输入框 -->
<div contenteditable="true">
<img src="1.gif" />
</div>
</body>
</html>