开发者

PHP, Javascript, HTML

How to get option value in PHP? And i want to redirect to the same page, if option is changed by using onClick() function. Anybod开发者_高级运维y please help me.


Javascript :

Use eleement_id.selectedIndex() function , It will give the selected option properties.


.......

<select name="select" onchange="document.location.href='this-page-name.php?val=' + this.value">
  options....
</select>

You can get its value like this:

echo $_GET['val'];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜