Jump to content
php.lv forumi

cucumber

Reģistrētie lietotāji
  • Posts

    667
  • Joined

  • Last visited

Posts posted by cucumber

  1. kaut ka ta? Algebrisko pusi gan jau var uztaisit labak uz fikso.

     

    ps. nemaz nezinaju ka ieksh JS Math.round(x) nevar padot precizitati O_o

     

    <script text="text/javascript">
    $ = function(id) { return document.getElementById(id); }
    
    function cntprice(){
    var price = $('price').value;
    var discount = $('discount').value;
    f = (price - (price*discount)/100)*100;
    $('sum').value = Math.round(f)/100;
    }
    </script> 
    
    <input type="text" id="price" value="32.55" />
    <input type="text" id="discount" value="" /><span onclick="cntprice()">aprekinat</span>
    <input type="text" id="sum" value="" />

  2. shim ifam jegas nav, pietikshu ar sho te $_LANG = $_REQUEST['lang'];

     

      if($_REQUEST['lang'] == "lv" OR $_REQUEST['lang'] == "en" OR $_REQUEST['lang'] == "ru" OR $_REQUEST['lang'] == "ee" OR $_REQUEST['lang'] == "lt"){
    		$_LANG = $_REQUEST['lang'];
    	} else {
    		$_LANG = "en";
    	}

     

    echo "<meta http-equiv=\"Refresh\" content=\"0;url=".$BASE."\">"; aizvieto ar header("location: $url");

  3. <html>
    <head>
    
    
    <script type="text/javascript">
    function myfunction(id)
    {
    document.getElementById(id).focus();
    document.getElementById(id).value = 'Jauns teksts';
    }
    </script>
    
    </head>
    <body>
    
    <form>
    <input id="inp1" type="text" val="">
    <input id="inp2" type="text" val="">
    <input type="button" onclick="myfunction('inp2')" value="Call function">
    </form>
    
    </body>
    </html>

  4. Ka var panakt URL parveidi www.staits.lv/manalapa.php --> www.staits.lv/manalapa

     

    it ka interneta atradu snipetu, bet vinsh neiet

    Options +FollowSymlinks
    RewriteEngine on
    RewriteRule ^(.*)\.htm$ $1.php [nc]

     

    ieksh htconfig'a esmu iesledzis mod_rewirte un modelis ari tads ir

     

    Varbut ko vel neesmu piekonfigurejis?

×
×
  • Create New...