我正在尝试从另一个 php 页面调用一个页面 div。我使用(在网上找到的)admin.php#changepass 调用它
喜欢----我的html代码
<div id="changepass" class="w3-container city" style="display:none">
<form name="changespass" class="w3-container" method="post" action="changepass.php">
<h2 class="w3-text-blue">Change password</h2>
<p>
<label class="w3-text-blue"><b>Current Password</b></label>
<input required autocomplete="off" name="currpass" class="w3-input w3-border w3-animate-input" type="password" style="width:30%">
<p>
<label class="w3-text-blue"><b>New Password</b></label>
<input required autocomplete="off" name="npass" class="w3-input w3-border w3-animate-input" type="password" style="width:30%">
<p>
<p>
<label class="w3-text-blue"><b>Confirm Password</b></label>
<input required autocomplete="off" name="cpass" class="w3-input w3-border w3-animate-input" type="password" style="width:30%">
<p>
<button name="submitx" onclick="checkx()" class="w3-btn w3-cyan w3-border w3-border-red w3-round-xlarge">Submit</button>
</form>
和我调用它的地方的 php 代码
echo "<script>
alert('vendors successfully added.');
window.location.href='admin.php#changepass';
</script>";
但它对我不起作用。它只显示 admin.php 页面 谁能帮帮我。
最佳答案
<div id="changepass" class="w3-container city" style="display:none">
remove style="display:none"
关于javascript - 如何从另一个 php 页面调用 div 链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41406636/