js动态设置input 只读,无边框效果

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<STYLE>
.output-body{readonly:expression(this.readOnly=true);border:0px;}
</STYLE>
</HEAD>

<BODY>
<input type="text" id="test">
<script>
document.getElementById("test").className="output-body";
</script>
</BODY>
</HTML>

你可能感兴趣的:(input)