<button>传值问题,html中js如何用button传值并跳转到一个新的页面

日期:2017-10-12 01:14:11 人气:1

<button>传值问题,html中js如何用button传值并跳转到一个新的页面

html中js用button传值并跳转到一个新的页面,我们首先需要的获取到button这个对象,还有button要传的值,然后在通过去Location加上地址链接就行了,这里我写段代码: var obut = document.getElmentById('but'); Location:'地址链接'; //location的链接地址 alert(obut .value);
    A+
热门评论