可以呀
<body>
<div id="tt">abc</div>
<input type="button" value="click" onclick="t()">
<script>
function t() {
tt.innerHTML += "<input type=button value=dclick onclick=t2()>";
}
function t2(){
alert("hi");//test
}
</script>
</body>
<body>
<div id="tt">abc</div>
<input type="button" value="click" onclick="t()">
<script>
function t() {
tt.innerHTML += "<input type=button value=dclick onclick=t2()>";
}
function t2(){
alert("hi");//test
}
</script>
</body>
<html>
<body>
</body>
<script language="javascript">
window.onload=function() {
var i=1;
var sb="<form name=smj onkeydown=if(event.keyCode==13){event.keyCode=9;}>"
document.body.innerHTML+=sb;var sb1="<td><input type=text name=name"+i+"></td>";
var sb2="<td><input type=text name=age"+i+"></td>";
var sb3="<td><input type=text name=city"+i+"></td>";document.body.innerHTML+=sb1;
document.body.innerHTML+=sb2;
document.body.innerHTML+=sb3;
}
</script>
</html>
Scripting SCRIPT.defer [ = bDefer ] Possible ValuesbDefer Boolean that specifies or receives one of the following values:false Default. Inline executable function is not deferred.
true Inline executable function is deferred.
The property is read/write. The property has a default value of false.Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see Dynamic Properties.ResUsing the attribute at design time can improve the download performance of a page because the browser does not need to parse and execute the script and can continue downloading and parsing the page instead.
defer怎么用?