我想在单击“Devam Et”按钮时将我的页面重定向到另一个页面。我该怎么做?我尝试使用 A 标签并尝试使用 JavaScript 代码,但它没有用。我在代码片段上分享了我的代码。任何帮助表示赞赏。
index.html
</div>
<div class="col-span-2 px-[10px]">
<button type="button" id="devamButton1" disabled x-bind:disabled="!marka || !model || !depolama || email.length < 5 || telefon.length != 10 || mesafeli == false || kvkk == false || gizlilik == false" onclick="nextStep(this,'#adim1','#adim2');" class="w-full fontCircular bg-blue-800 hover:bg-indigo-500 active:bg-indigo-600 rounded-lg mt-3 focus:outline-none min-h-[50px] shadow-md opacity-80 text-white text-lg" data-te-ripple-init data-te-ripple-color="light" >Devam Et</button>
</div>
</li>
<li class="flex-col hidden lg:grid-cols-2" id="adim2">
<div class="flex flex-col items-stretch justify-start col-span-2">
<label for="onayKodu">Sms Onay Kodu<span class="text-red-500">*</span></label>
<input type="text" id="onayKodu" name="onayKodu" x-model="onayKodu" placeholder="SMS Onay Kodu" class="shadow-md" required maxlength="4" oninput="this.value = this.value.replace(/[^0-9]/g, '').replace(/(\..*)\./g, '$1');">
</div>
<div class="col-span-2 px-[10px]">
<button type="button" id="devamButton2" disabled x-bind:disabled="onayKodu.length != 4" onclick="nextStep(this,'#adim2','#adim3')" class="w-full fontCircular bg-blue-800 hover:bg-indigo-500 active:bg-indigo-600 rounded-lg mt-3 focus:outline-none min-h-[50px] shadow-md opacity-80 text-white text-lg" data-te-ripple-init data-te-ripple-color="light" >Devam Et</button>
</div>
</li>
请添加像这样的起始表格标签** **
您需要更改的按钮类型=“提交”。在该表单之后重定向另一个页面。但你需要赖特表格动作数据提交代码......谢谢