日期:2014-05-16  浏览次数:20436 次

Javascript动态创建控件
<html>

<head>

<title></title>
<script?language="javascript"?type="text/javascript">
function?createElement(tagName,?type)
{
???
var?element?=?null;
???
try
???
{
??????element?
=?document.createElement('<'?+?tagName?+?'?name="'+name+'"?/>');
??????element.type?
=?type;
??????element.value?
=?value;
???}

???
catch?(e)
???
{
???}

???
if?(?!<