[HTML]<div name="wenben" id="wenben">Hig hLight me and Click Button</div>
<input onClick="makeit big()" type="button" value="make it big">
<script>
function makeitbig(){
if (navigator.appN ame=='Netscape' )
{document.getSe lection().execC ommand("FontSiz e",false,29) ;}
else {document.selec tion.createRang e().execCommand ("FontSize",fal se,29);}...
User Profile
Collapse
-
How to Create Range in Firefox
-
Thanks very much, i will check that in details. -
Question about array
In php, we have array_intersect to check if 2 arrays have intersected. Is there anythings like that in Javascript?? -
-
How to refresh the page?
[HTML]<script>
function refreshing() {
action = new XMLHttpRequest( );
action.open("GE T", "test.txt" , true);
action.onreadys tatechange = function () {
var response = action.response Text;
document.getEle mentById('kk'). innerHTML=respo nse;};
action.send(nul l); }
setInterval('re freshing()',300 0);
</script> ... -
need help about urlrewrite
In apache, i set override all,
open rewrite mode..
I have installed wordpress into it. It can rewrite url. That means my setting is correct.
Look at wordpress htaccess, something like this
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteCond %{REQUEST_FILEN AME} !-f
RewriteCond %{REQUEST_FILEN AME} !-d
RewriteRule . /wordpress/index.php [L]... -
question about match or replace
in php we have
[PHP]
<?php>
$pattern[0]='/a/i';
$pattern[1]='/b/i';
$replacement[0]='';
$replacement[1]='';
$var = 'Watbe';
echo preg_replace($p attern, $replacement, $var);
?>[/PHP]
using pattern array to replace two match at the same time.
Under is what i know in javascript
[HTML]<script>
var str="aacc";... -
I know the reason......... ... Time Zone........... ... i guess i have to rewrite the program........ .. thankssssss...Leave a comment:
-
Same script, but work in some server and doesn't work in some server.
[PHP]<?php
$range = split(',', '2008-11-1>2008-11-30=123,2008-12-1>2008-12-31=222,');
for ($y=0; $y<(count($rang e)-1); $y++){
$equalto = explode('=',$ra nge[$y]);
$splitagain = split('>',$equa lto[0]);
for ($s=strtotime($ splitagain[0]); $s<(strtotime($ splitagain[1])+10); $s=$s+(60*60*24 ))
{
$money[$s]=$equalto[1];
}
}
$kk = $money[1225497600];... -
[PHP]<?php
$a = array(1,2,3,4,5 );
$b = array(1,2,3,4,5 ,6,7,8);
echo count(array_int ersect($a, $b));
?>[/PHP]
Thanks I understand...Leave a comment:
-
Showing the number of matches returned by array_intersect
[PHP]<?php
$a = array(1,2,3,4,5 );
$b = array(1,2,3,4,5 ,6,7,8);
echo array_intersect ($a, $b);
?> [/PHP]
array_intersect should return the numbers of items intersect in 2 arrays. In this case, it should be 5. However it return "Array".... Does anyone know why?Last edited by Atli; Apr 18 '08, 09:39 PM. Reason: Changed thread title to better describe it's contents. -
Thanks very much, actually, not because of it..
by using strcmp we don't need to trim the string, but i don't know why if i use ==, i have to trim it, by using the below, it works
[PHP]<?php
if (trim($check!)! ==trim($_SESSIO N["validate"])){echo 'Validation is not ok';}
else { echo 'OK';}
?>[/PHP]Leave a comment:
-
need help about php variable
[PHP]<?php
if ($check!==$_SES SION["validate"]){echo 'Validation is not ok';}
else { echo 'OK';}
?>[/PHP]
the above doesn't work
but the below work
[PHP]<?php
if ($check==$_SESS ION["validate"]){echo 'ok';}
else { echo 'validadation is not OK';}
?>[/PHP]
How the variables work logically with 'if' in PHP??? strange
... -
has anybody done any travel & tourism site before?
although this question doesn't soud like programming,
however, i really want to know where can we get "airlines realtime informations"
like class, from where to where, reservation, price........su ch kind of things....
is there any central database where we can pay to use it? -
a very simple questions about array
for example, we can make an array simply by the below method
[code=php]
<?php
$var1 = a;
$var2 = b;
$var3 = c;
$variables = array($var1,$va r2,$var3);
?>
[/code]
Below, we can use "for loop" to echo out 0,1,2,3,4....20 ,
However, how can we use the "echo-out(0,1,2,3,4.. ..)" to make an array
like the above one???
[code=php]
<?php
...
No activity results to display
Show More
Leave a comment: