使用escape()函数
var str="计算机";
escape(str);
就得到了!
或者是UrlEncode()
http://docs.noahweb.net/function_STR_UrlEncode.html
希望对你有帮助!

解决方案 »

  1.   


    其实我的问题是这样的:
    我跟人家学做的baidu,google一起搜,老是baidu的结果会突然占领整个页面
    是怎么会事呢:http://philzxs.3j2.net/search.php  
    input.php
    ------------------------- 
    <form action="http://philzxs.3j2.net/search.php" name="inputbox" method="get" target="_blank">
    <input type="text" name="content"/>
    <input type="submit" value="17search"/>
    </form>
    --------------------------------------------------
    search.php
    -------------------------------------------
    <?php
    $content=$_GET['content'];
    ?>
    <frameset rows="100,400,*">
    <frame src="input.php" name="top"/></form>
    <frameset cols="512,*" noresize="0"/>
    <frame  src="http://www.google.cn/search?hl=zh-CN&q=<? echo $content; ?>" name="downleft">
    <frame  src="http://www.baidu.com/s?wd=<? echo $content; ?>&cl=3" name="downright">
    </frameset>
    <frame src="input.html" name="dixia"/>
    </frameset>