dedecmsv57上传漏洞:java网页上的一个效果

来源:百度文库 编辑:高校问答 时间:2024/05/04 17:43:13
偶不明白到底为什么不可以?
<body>
<form action="" method="post" name="f55" id="f55">
<input name="te" type="text" id="te">
</form>

<form name="form4" method="post" action="">
<input type="submit" name="Submit3" value="提交">
<script language="JavaScript" type="text/JavaScript">
function pd()
{
var i,j,s,
s=document.f55.te.value
for(i=1;i<=s;i++)
{
for (j=1;j<=2*i-1 ;j++)
{
document.form5.t8.value="*"
}
document.form5.t8.value="<br>"
}
}
</script>
<textarea name="t8" id="t8"></textarea>
</form>
<p></p>

</body>
</html>

错误我给你改好了,太多了,你自己看看:
1.在按钮上加入onclick事件onclick="pd();";
2.textarea用document.f55.t8取不到,就用document.getElementsByName("t8")[0]取;
3.在textarea中不认<br>为回车,则用\n;

<body>
<form action="" method="post" name="f55" id="f55">
<input name="te" type="text" id="te">
</form>

<form name="form4" method="post" action="">
<input type="button" name="Submit3" value="提交" onclick="pd();">
<script language="JavaScript" type="text/JavaScript">
function pd()
{
var i,j,s,
s=document.f55.te.value;
for(i=1;i<=s;i++)
{
for (j=1;j<=2*i-1 ;j++)
{
document.getElementsByName("t8")[0].value+="*";
}
document.getElementsByName("t8")[0].value+="\n";
}
}
</script>
<textarea name="t8" id="t8"></textarea>
</form>
<p></p>

</body>
</html>

错误是你的脚本语言放错位置了

<html>
<head>
<script language="JavaScript" type="text/JavaScript">
function pd()
{
var i,j,s,
s=document.f55.te.value
for(i=1;i<=s;i++)
{
for (j=1;j<=2*i-1 ;j++)
{
document.form5.t8.value="*"
}
document.form5.t8.value="<br>"
}
}
</script>
</head>
<body>
<form action="" method="post" name="f55" id="f55">
<input name="te" type="text" id="te">
</form>

<form name="form4" method="post" action="">
<input type="submit" name="Submit3" value="提交">

<textarea name="t8" id="t8"></textarea>
</form>
<p></p>

</body>
</html>

在上面的document.form5.t8.value里面你哪来的对像form5,我从上看到下都没有找到这个对像呀