<html>
<body>
<script language="javascript">
function kk(str)
{
document.getElementById(str).value="sdgsg";//参数做动态的id
}</script><input type="text" id='001'>
<input type="submit" onClick="kk('001')">
</body>
</html><input type="text" id='001'>
<input type="submit" onClick="kk('001')">
</body>
</html>
还有,请检查你程序中的拼写错误,希望以后能细心点^^
<body>
<script language="javascript">
function kk(str)
{
document.getElementById(str).value="sdgsg";//参数做动态的id
}</script><input type="text" id='001'>
<input type="submit" onClick="kk('001')">
</body>
</html><input type="text" id='001'>
<input type="submit" onClick="kk('001')">
</body>
</html>
还有,请检查你程序中的拼写错误,希望以后能细心点^^
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货