我想建立webpage.packing.php包含PHP JavaScript的加載順序問題:乾淨的URL和PHP
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="description" content="Fresh Sliding Thumbnails Gallery with jQuery and PHP" />
<meta name="keywords" content="jquery, images, gallery, full page, thumbnails, scrolling, sliding, php, xml"/>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen"/>
<link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />
<script type="text/javascript" src="js/jquery-1.6.1.js"></script>
<link rel="stylesheet" type="text/css" href="css/site.css" />
<script type="text/javascript" src="js/ddsmoothmenu.js">
</script>
<script type="text/javascript" src="js/jquery.gallery.js"></script>
<script type="text/javascript" >
$(document).ready(function(){
// Menu
ddsmoothmenu.init({
mainmenuid: "smoothmenu1", //menu DIV id
orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
classname: 'ddsmoothmenu', //class added to menu's outer DIV
//customtheme: ["#1c5a80", "#18374a"],
contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
});
});
</script>
和我的.htaccess是
RewriteEngine On
RewriteRule ^packing/Pure packing.php?id=pure
RewriteRule ^packing/ExtraVirgin packing.php?id=EV
現在,當我打開我的PHP它呈現正常說我打開packing.php
但是,當我打開使用乾淨的URL它給出了一個錯誤,在螢火蟲中說$沒有定義。
現在我知道問題是由於javascripts的加載順序錯誤。 爲什麼會發生?我該如何解決?
謝謝。
遺憾未能標誌着兩個答案正確的..謝謝了很多 – 2011-06-12 11:51:29
無課程問題:) – Nanne 2011-06-12 12:06:31