如何使用jquery获取空间值栏? [英] How to get space value bar with jquery?

查看:91
本文介绍了如何使用jquery获取空间值栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题用jquery获取文本框的价值。这里我的剧本



Hi, I have problem to get value on textbox with jquery. here my script

<input autocomplete='off' id='filter' name='filterpenulis' type='text' value=''  önkeyup="var url='filter.php?key='+document.getElementById('filter').value; $('#showpenulis').load(url);  return false;">
<div id='showpenulis'></div>



和这里我的filter.php


and here my filter.php

<?php
   $key=$_GET['key'];
   echo $key;
   .......
?>





如果我输入空格键,则上面的这个脚本不起作用。

例子

input =>qwerty

result =>qwerty



input => qwerty qwerty

result => < =空白输出



如何获得结果qwerty qwerty?



this script above not work if I input "Space Bar".
example
input => "qwerty"
result=> "qwerty"

input => "qwerty qwerty"
result=> "" <= blank output

how to get result "qwerty qwerty"?

推荐答案

( '#showpenulis')负载(URL);返回false; >
< div id =' showpenulis' > < / div >
('#showpenulis').load(url); return false;"> <div id='showpenulis'></div>



和这里我的filter.php


and here my filter.php

<?php


key =


_GET [' key'];
echo
_GET['key']; echo


这篇关于如何使用jquery获取空间值栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆