我正在創建一個文件夾通過生成一個隨機字符串,我需要獲取該字符串值使用JavaScript的文本框。如何獲得字符串值使用JavaScript與文本框的文本框
這是我的JavaScript代碼:
<script type="text/javascript">
var tempDir = randomString(8);
document.getElementById("currentDirectory").value = tempDir;
alert(tempDir);
</script>
這是我需要顯示
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
我的答案現在適合你嗎? –