在一个javascript文件里可以再写入的javascript判断代码吗? document.write("<SCRIPT language=javascript>")document.write(" usernameshow.focus();")document.write("</SCRIPT>") 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 document.write("<SCRIPT language=javascript>")document.write("<!--")document.write("function window_onload() {")document.write(" document.form1.usernameshow.focus();") //写上form名称document.write("}")document.write("//-->")document.write("</SCRIPT>")试试 你在进入页面的时候调用window_onload()这个函数了吗? <body onload="document.myForm.usernameshow.focus();">这样就行了 在JavaScript里以document.write方式直接重载是不可以的,想再重载必须在外部调用。 JS 获取时间 之后加入 文本框中? js 控制div是位置 关于编辑器的问题!!! 为什么全局变量 没有赋值成功(或者说又被刷回初值了?) 关于javascript的一些疑惑 奇怪为什么会多输出一个undefined?请各位朋友指点一下,谢谢了 大家帮忙看一下这个问题. 怎样用javascript实现身份验证 树形结构问题(要在表单中呈现) 请问用window.open打开的窗口(去掉状态栏等一些东西)怎样一出来就是最大化的? 怎样弹出一个窗口,并且在该窗口写上一些html代码。 如何在多行文本框中检测到回车?
document.write("<!--")
document.write("function window_onload() {")
document.write(" document.form1.usernameshow.focus();") //写上form名称
document.write("}")
document.write("//-->")
document.write("</SCRIPT>")试试