Search Results for 'javascript' (3 Posts)

  1. 2008/11/05 php.js - explon
  2. 2008/10/31 可以在所有浏览器弹出窗口的 JS - explon
  3. 2008/05/07 让 innerHTML 中的脚本跑起来 (1) - explon

php.js

qrcode Mobile version:
Emulate PHP's function for Javascript, you can download it here.

Useage: $PHP.function(...)

function list:

stripos(haystack, needle, offset)
trim(str)
htmlspecialchars(str)
strpad(text, length, padstring)
urlencode(str)
urldecode(str)
ucfirst(str, cutoff)
in_array(needle, haystack, strict)
rand(min, max)
str_replace(search, replace, subject)



2008/11/05 00:58 2008/11/05 00:58

댓글을 달아 주세요

write a comment

qrcode Mobile version:
背弹式,24 小时一次,被浏览器拦截后跟随网页的 onclick 事件触发。



2008/10/31 22:42 2008/10/31 22:42

댓글을 달아 주세요

write a comment

qrcode Mobile version:
我们知道普通方式 innerHTML 到容器中的脚本浏览器器是不会执行的,今天看 mootools 的时候发现靠它可以做到.

Ajax 类的说明:
Class: Ajax
    An Ajax class, For all your asynchronous needs.
    Inherits methods, properties, options and events from <xhr>.

Arguments:
    url - the url pointing to the server-side script.
    options - optional, an object containing options.

Options:
    data - you can write parameters here. Can be a querystring, an object or a Form element.
    update - $(element) to insert the response text of the XHR into, upon completion of the request.
    evalScripts - boolean; default is false. Execute scripts in the response text onComplete. When the response is javascript the whole response is evaluated.
    evalResponse - boolean; default is false. Force global evalulation of the whole response, no matter what content-type it is.
   
Events:
    onComplete - function to execute when the ajax request completes.</xhr>



Example:
>var myAjax = new Ajax('js.txt', {method: 'get', update: $$('body'), evalScripts: true}).request();
js.txt:
<script type="text/javascript"> alert('TEST'); </script>

2008/05/07 15:11 2008/05/07 15:11

댓글을 달아 주세요

  1. smartly 2008/05/20 16:05

    天将降大任于斯国也,必先撞其火车,抢其火炬,震其国土,涨其物价,空乏其民,行拂乱其股市! 大国崛起之征兆也.

write a comment