<!DOCTYPE html>
<html>
<head>
<title>测试</title>
<script>
var use= this.opener.name;
document.mess.user.value=use;
//alert(use);
</script>
</head>
<body >
<p><strong>测试</strong></p>
<form action="../php/sendMessage.php" method="post" id="mess">
<p>
<label for="message">message:</label>
<textarea name="message" cols="50" rows="10" id="message" autofocus>
</textarea>
<input type="hidden" name="user" value="use"/>
</p>
<p>
<input type="submit" name="submit" value="上传" >
</p>
</form>
</body>
</html>
我表单里面的user.value想用script里面的use变量,请问应该如何修改啊
谢谢
<html>
<head>
<title>测试</title>
<script>
var use= this.opener.name;
document.mess.user.value=use;
//alert(use);
</script>
</head>
<body >
<p><strong>测试</strong></p>
<form action="../php/sendMessage.php" method="post" id="mess">
<p>
<label for="message">message:</label>
<textarea name="message" cols="50" rows="10" id="message" autofocus>
</textarea>
<input type="hidden" name="user" value="use"/>
</p>
<p>
<input type="submit" name="submit" value="上传" >
</p>
</form>
</body>
</html>
我表单里面的user.value想用script里面的use变量,请问应该如何修改啊
谢谢